oota-llvm.git
11 years agoAArch64: remove accidental test output file.
Tim Northover [Tue, 18 Jun 2013 21:16:53 +0000 (21:16 +0000)]
AArch64: remove accidental test output file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184236 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove Path::canWrite.
Rafael Espindola [Tue, 18 Jun 2013 21:10:03 +0000 (21:10 +0000)]
Remove Path::canWrite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184235 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a can_write function to PathV2.
Rafael Espindola [Tue, 18 Jun 2013 20:56:38 +0000 (20:56 +0000)]
Add a can_write function to PathV2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184233 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ARMTargetLowering] ARMISD::{SUB,ADD}{C,E} second result is a boolean implying that...
Michael Gottesman [Tue, 18 Jun 2013 20:49:45 +0000 (20:49 +0000)]
[ARMTargetLowering] ARMISD::{SUB,ADD}{C,E} second result is a boolean implying that upper bits are always 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184231 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConverted an overly aggressive assert to a conditional check in AddCombineTo64bitMLAL.
Michael Gottesman [Tue, 18 Jun 2013 20:49:40 +0000 (20:49 +0000)]
Converted an overly aggressive assert to a conditional check in AddCombineTo64bitMLAL.

Said assert assumes that ADDC will always have a glue node as its second
argument and is checked before we even know that we are actually performing the
relevant MLAL optimization. This is incorrect since on ARM we *CAN* codegen ADDC
with a use list based second argument. Thus to have both effects, I converted
the assert to a conditional check which if it fails we do not perform the
optimization.

In terms of tests I can not produce an ADDC from the IR level until I get in my
multiprecision optimization patch which is forthcoming. The tests for said patch
would cause this assert to fail implying that said tests will provide the
relevant tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184230 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unused Path::canRead.
Rafael Espindola [Tue, 18 Jun 2013 20:42:25 +0000 (20:42 +0000)]
Remove unused Path::canRead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184229 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix 80 col violation.
Nadav Rotem [Tue, 18 Jun 2013 20:41:52 +0000 (20:41 +0000)]
Fix 80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184228 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange the arm assembler to support this from the v7c spec:
Kevin Enderby [Tue, 18 Jun 2013 20:19:24 +0000 (20:19 +0000)]
Change the arm assembler to support this from the v7c spec:
"When assembling to the ARM instruction set, the .N qualifier produces
an assembler error and the .W qualifier has no effect."

In the pre-matcher handler in the asm parser the ".w" (wide) qualifier
when in ARM mode is now discarded. And an error message is now
produced when the ".n" (narrow) qualifier is used in ARM mode.

Test cases for these were added.

rdar://14064574

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184224 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDuring SelectionDAG building explicitly set a node to constant zero when the
Quentin Colombet [Tue, 18 Jun 2013 20:14:39 +0000 (20:14 +0000)]
During SelectionDAG building explicitly set a node to constant zero when the
value is zero.
This allows optmizations to kick in more easily.
Fix some test cases so that they remain meaningful (i.e., not completely dead
coded) when optimizations apply.

<rdar://problem/14096009> superfluous multiply by high part of zero-extended
value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184222 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMips ELF: Mark object file as ABI compliant
Jack Carter [Tue, 18 Jun 2013 19:47:15 +0000 (19:47 +0000)]
Mips ELF: Mark object file as ABI compliant

When producing objects that are abi compliant we are
marking neither the object file nor the assembly file
correctly and thus generate warnings.

We need to set the EF_CPIC flag in the ELF header when
generating direct object.

Note that the warning is only generated when compiling without PIC.

When compiling with clang the warning will be suppressed by supplying:

 -Wa,-mno-shared -Wa,-call_nonpic

Also the following directive should also be added:

.option pic0

when compiling without PIC,  This eliminates the need for supplying:

  -mno-shared -call_nonpic

on the assembler command line.

Patch by Douglas Gilmore

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184220 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove uniqueID from PathV1.h.
Rafael Espindola [Tue, 18 Jun 2013 19:46:19 +0000 (19:46 +0000)]
Remove uniqueID from PathV1.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184219 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a GetUniqueID that will replace the uniqueID of PathV1.h.
Rafael Espindola [Tue, 18 Jun 2013 19:34:49 +0000 (19:34 +0000)]
Add a GetUniqueID that will replace the uniqueID of PathV1.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184217 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReduce indentation.
David Blaikie [Tue, 18 Jun 2013 18:03:17 +0000 (18:03 +0000)]
Reduce indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184213 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert most uses of PathV1.h in ToolRunner.cpp.
Rafael Espindola [Tue, 18 Jun 2013 17:20:08 +0000 (17:20 +0000)]
Convert most uses of PathV1.h in ToolRunner.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184210 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd support for encoding the HLE XACQUIRE and XRELEASE prefixes.
Stefanus Du Toit [Tue, 18 Jun 2013 17:08:10 +0000 (17:08 +0000)]
Add support for encoding the HLE XACQUIRE and XRELEASE prefixes.

For decoding, keep the current behavior of always decoding these as their REP
versions. In the future, this could be improved to recognize the cases where
these behave as XACQUIRE and XRELEASE and decode them as such.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184207 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a version of unique_file that return just the file name.
Rafael Espindola [Tue, 18 Jun 2013 17:01:00 +0000 (17:01 +0000)]
Add a version of unique_file that return just the file name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184206 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReturn a std::string from PrependMainExecutablePath.
Rafael Espindola [Tue, 18 Jun 2013 16:47:55 +0000 (16:47 +0000)]
Return a std::string from PrependMainExecutablePath.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184204 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove PathV1.h use from BugDriver.cpp.
Rafael Espindola [Tue, 18 Jun 2013 16:21:54 +0000 (16:21 +0000)]
Remove PathV1.h use from BugDriver.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184203 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove use of PathV1.h from ExecutionDriver.cpp.
Rafael Espindola [Tue, 18 Jun 2013 16:14:09 +0000 (16:14 +0000)]
Remove use of PathV1.h from ExecutionDriver.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184202 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoScan the successor blocks and use the PHI nodes as a hint for possible chain roots.
Nadav Rotem [Tue, 18 Jun 2013 15:58:05 +0000 (15:58 +0000)]
Scan the successor blocks and use the PHI nodes as a hint for possible chain roots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184201 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a return value to make this function more useful.
Nadav Rotem [Tue, 18 Jun 2013 15:57:12 +0000 (15:57 +0000)]
Add a return value to make this function more useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184200 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove usage of PathV1.h from OptimizerDriver.cpp.
Rafael Espindola [Tue, 18 Jun 2013 15:54:13 +0000 (15:54 +0000)]
Remove usage of PathV1.h from OptimizerDriver.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184198 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert some uses of eraseFromDisk.
Rafael Espindola [Tue, 18 Jun 2013 15:33:18 +0000 (15:33 +0000)]
Convert some uses of eraseFromDisk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184196 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in tools/bugpoint/Miscompilation.cpp.
Rafael Espindola [Tue, 18 Jun 2013 15:29:32 +0000 (15:29 +0000)]
Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184193 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBasic support for parsing Mach-O universal binaries in LLVMObject library
Alexey Samsonov [Tue, 18 Jun 2013 15:03:28 +0000 (15:03 +0000)]
Basic support for parsing Mach-O universal binaries in LLVMObject library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184191 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't convert object_error's enum to and from int.
Rafael Espindola [Tue, 18 Jun 2013 13:30:31 +0000 (13:30 +0000)]
Don't convert object_error's enum to and from int.

This allows the compiler to see the enum and warn about it. While in here,
fix a switch to not use a default and fix style violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184186 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: fix literal load with positive offset encoding
Amaury de la Vieuville [Tue, 18 Jun 2013 08:13:05 +0000 (08:13 +0000)]
ARM: fix literal load with positive offset encoding

When using a positive offset, literal loads where encoded
as if it was negative, because:
- The sign bit was not assigned to an operand
- The addrmode_imm12 operand was not encoding the sign bit correctly

This patch also makes the assembler look at the .w/.n specifier for
loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184182 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: add operands pre-writeback variants when needed
Amaury de la Vieuville [Tue, 18 Jun 2013 08:12:51 +0000 (08:12 +0000)]
ARM: add operands pre-writeback variants when needed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184181 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: fix thumb literal loads decoding
Amaury de la Vieuville [Tue, 18 Jun 2013 08:03:06 +0000 (08:03 +0000)]
ARM: fix thumb literal loads decoding

This fixes two previous issues:
- Negative offsets were not correctly disassembled
- The decoded opcodes were not the right one

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184180 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: thumb stores cannot use PC as dest register
Amaury de la Vieuville [Tue, 18 Jun 2013 08:02:56 +0000 (08:02 +0000)]
ARM: thumb stores cannot use PC as dest register

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184179 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHopefully fix the MSVS build after r184105
Timur Iskhodzhanov [Tue, 18 Jun 2013 07:57:22 +0000 (07:57 +0000)]
Hopefully fix the MSVS build after r184105

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184178 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse pointers to the MCAsmInfo and MCRegInfo.
Bill Wendling [Tue, 18 Jun 2013 07:20:20 +0000 (07:20 +0000)]
Use pointers to the MCAsmInfo and MCRegInfo.

Someone may want to do something crazy, like replace these objects if they
change or something.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184175 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix nondeterminism in .gcno file generation.
Nick Lewycky [Tue, 18 Jun 2013 06:38:21 +0000 (06:38 +0000)]
Fix nondeterminism in .gcno file generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184174 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove dead prototype.
Bill Wendling [Tue, 18 Jun 2013 06:24:14 +0000 (06:24 +0000)]
Remove dead prototype.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184173 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplify some of the code. No functionality change.
Bill Wendling [Tue, 18 Jun 2013 06:07:26 +0000 (06:07 +0000)]
Simplify some of the code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184172 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoremove some @deprecated markers: LLVM APIs aren't deprecated, they are removed when...
Chris Lattner [Tue, 18 Jun 2013 04:57:25 +0000 (04:57 +0000)]
remove some @deprecated markers: LLVM APIs aren't deprecated, they are removed when obsolete.
These APIs are still used, and the constant APIs are actually really important.

Removing these makes -Wdocumentation more useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184170 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBuild Apple's llvmCore with --disable-zlib. <rdar://problem/14182316>
Bob Wilson [Tue, 18 Jun 2013 01:22:29 +0000 (01:22 +0000)]
Build Apple's llvmCore with --disable-zlib. <rdar://problem/14182316>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184164 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Factor out string table section creation.
Sean Silva [Tue, 18 Jun 2013 01:11:27 +0000 (01:11 +0000)]
[yaml2obj][ELF] Factor out string table section creation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184162 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Refer specifically to the section header string table.
Sean Silva [Tue, 18 Jun 2013 01:11:24 +0000 (01:11 +0000)]
[yaml2obj][ELF] Refer specifically to the section header string table.

A bug in libObject will cause it to assert() if a symbol table's string
table and the section header string table are the same section, so we
need to ensure that we emit two different string tables (among other
things). The problematic code is the hardcoded usage of ".strtab"
(`dot_strtab_sec`) for looking up symbol names in
ELFObjectFile<ELFT>::getSymbolName.

I discussed this with Michael, and he has some local improvements to the
ELF code in libObject that, among other things, should fix our handling
of this scenario.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184161 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Ensure more fields are zero'd.
Sean Silva [Tue, 18 Jun 2013 01:11:21 +0000 (01:11 +0000)]
[yaml2obj][ELF] Ensure more fields are zero'd.

I was spotting garbage in the output. I'd like to just zero the entire
ELFYAML::Section to be sure, but it contains non-POD types. (I'm also
trying to avoid bloating the ELFYAML::Foo classes with a bunch of
constructor code).

No test, since this is by its very nature unpredictable. I'm pretty sure
that one of the sanitizers would catch it immediately though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184160 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix the build with gcc 4.7 and -std=c++11.
Rafael Espindola [Mon, 17 Jun 2013 22:24:06 +0000 (22:24 +0000)]
Fix the build with gcc 4.7 and -std=c++11.

The error message was:

/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp: In function ‘ld_plugin_status cleanup_hook()’:
/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp:461:30: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>}’ through ‘...’

I will check if this was a clang or gcc issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184138 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert two uses of eraseFromDisk.
Rafael Espindola [Mon, 17 Jun 2013 21:50:28 +0000 (21:50 +0000)]
Convert two uses of eraseFromDisk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184136 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: handle ReadAdvance latencies as used by Swift.
Andrew Trick [Mon, 17 Jun 2013 21:45:18 +0000 (21:45 +0000)]
MI-Sched: handle ReadAdvance latencies as used by Swift.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184135 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReenable, improve, and add MI-Sched unit tests.
Andrew Trick [Mon, 17 Jun 2013 21:45:16 +0000 (21:45 +0000)]
Reenable, improve, and add MI-Sched unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184134 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGive RegMax higher priority.
Andrew Trick [Mon, 17 Jun 2013 21:45:13 +0000 (21:45 +0000)]
Give RegMax higher priority.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184133 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove compareRPDelta.
Andrew Trick [Mon, 17 Jun 2013 21:45:11 +0000 (21:45 +0000)]
Remove compareRPDelta.

A complex, expensive heuristic with little value in the current design.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184132 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI Sched: fix a typo in RegPressure heuristics.
Andrew Trick [Mon, 17 Jun 2013 21:45:09 +0000 (21:45 +0000)]
MI Sched: fix a typo in RegPressure heuristics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184131 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: Remove another heuristic that is sensitive to queue order.
Andrew Trick [Mon, 17 Jun 2013 21:45:07 +0000 (21:45 +0000)]
MI-Sched: Remove another heuristic that is sensitive to queue order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184130 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: Track multiple candidates with the same priority level.
Andrew Trick [Mon, 17 Jun 2013 21:45:05 +0000 (21:45 +0000)]
MI-Sched: Track multiple candidates with the same priority level.

This eliminates the MultiPressure scheduling "reason". It was
sensitive to queue order. We don't like being sensitive to queue
order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184129 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove usage of PathV1.h in FindBugs.cpp.
Rafael Espindola [Mon, 17 Jun 2013 20:48:36 +0000 (20:48 +0000)]
Remove usage of PathV1.h in FindBugs.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184122 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDirectly access objects which may change during compilation.
Bill Wendling [Mon, 17 Jun 2013 20:41:25 +0000 (20:41 +0000)]
Directly access objects which may change during compilation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184121 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReapply r183985 now that the missing check was added to PathV2.
Rafael Espindola [Mon, 17 Jun 2013 20:37:56 +0000 (20:37 +0000)]
Reapply r183985 now that the missing check was added to PathV2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184120 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoOnly delete regular files and directories.
Rafael Espindola [Mon, 17 Jun 2013 20:35:51 +0000 (20:35 +0000)]
Only delete regular files and directories.

This ports a missing feature from PathV1.h. I am not sure how to test this
with the regular infrastructure, but an Apple bot should check this when
r183985 is reapplied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184119 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: PV stores Reg id, not index
Vincent Lejeune [Mon, 17 Jun 2013 20:16:40 +0000 (20:16 +0000)]
R600: PV stores Reg id, not index

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184117 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Properly set COUNT_3 bit in TEX clause initiating inst for pre EG gen.
Vincent Lejeune [Mon, 17 Jun 2013 20:16:26 +0000 (20:16 +0000)]
R600: Properly set COUNT_3 bit in TEX clause initiating inst for pre EG gen.

Fixes rv7x0 bug in Heaven reported here:
https://bugs.freedesktop.org/show_bug.cgi?id=64257

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184116 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Exit with error status on error.
Sean Silva [Mon, 17 Jun 2013 20:14:59 +0000 (20:14 +0000)]
[yaml2obj][ELF] Exit with error status on error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184115 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "Remove a use of PathV1.h."
Rafael Espindola [Mon, 17 Jun 2013 19:54:17 +0000 (19:54 +0000)]
Revert "Remove a use of PathV1.h."

This reverts commit r183985.

We were missing the checks for not deleting things like /dev/null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184111 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in CrashDebugger.cpp.
Rafael Espindola [Mon, 17 Jun 2013 19:33:18 +0000 (19:33 +0000)]
Don't use PathV1.h in CrashDebugger.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184109 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in ToolRunner.h.
Rafael Espindola [Mon, 17 Jun 2013 19:21:38 +0000 (19:21 +0000)]
Don't use PathV1.h in ToolRunner.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184107 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove CBE related code.
Rafael Espindola [Mon, 17 Jun 2013 19:03:02 +0000 (19:03 +0000)]
Remove CBE related code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184106 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSwitch spill weights from a basic loop depth estimation to BlockFrequencyInfo.
Benjamin Kramer [Mon, 17 Jun 2013 19:00:36 +0000 (19:00 +0000)]
Switch spill weights from a basic loop depth estimation to BlockFrequencyInfo.

The main advantages here are way better heuristics, taking into account not
just loop depth but also __builtin_expect and other static heuristics and will
eventually learn how to use profile info. Most of the work in this patch is
pushing the MachineBlockFrequencyInfo analysis into the right places.

This is good for a 5% speedup on zlib's deflate (x86_64), there were some very
unfortunate spilling decisions in its hottest loop in longest_match(). Other
benchmarks I tried were mostly neutral.

This changes register allocation in subtle ways, update the tests for it.
2012-02-20-MachineCPBug.ll was deleted as it's very fragile and the instruction
it looked for was gone already (but the FileCheck pattern picked up unrelated
stuff).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184105 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix for a regression caused by the LoopVectorizer when
Pekka Jaaskelainen [Mon, 17 Jun 2013 18:49:06 +0000 (18:49 +0000)]
Fix for a regression caused by the LoopVectorizer when
vectorizing loops with memory accesses to non-zero address spaces. It
simply dropped the AS info. Fixes PR16306.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184103 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in ExtractFunction.cpp.
Rafael Espindola [Mon, 17 Jun 2013 18:48:59 +0000 (18:48 +0000)]
Don't use PathV1.h in ExtractFunction.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184102 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in tools/gold/gold-plugin.cpp.
Rafael Espindola [Mon, 17 Jun 2013 18:38:18 +0000 (18:38 +0000)]
Don't use PathV1.h in tools/gold/gold-plugin.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184099 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in LTOCodeGenerator.cpp
Rafael Espindola [Mon, 17 Jun 2013 18:05:35 +0000 (18:05 +0000)]
Don't use PathV1.h in LTOCodeGenerator.cpp

This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184095 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't use PathV1.h in llvm-link.
Rafael Espindola [Mon, 17 Jun 2013 17:32:19 +0000 (17:32 +0000)]
Don't use PathV1.h in llvm-link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184092 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDisable vectorization for -Oz.
Nadav Rotem [Mon, 17 Jun 2013 17:22:40 +0000 (17:22 +0000)]
Disable vectorization for -Oz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184089 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDelete declared but not implemented functions.
Rafael Espindola [Mon, 17 Jun 2013 17:15:00 +0000 (17:15 +0000)]
Delete declared but not implemented functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184087 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEnable the loop vectorizer by default for -Os and -O2.
Nadav Rotem [Mon, 17 Jun 2013 16:23:34 +0000 (16:23 +0000)]
Enable the loop vectorizer by default for -Os and -O2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184084 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMove lib/Archive to tools/llvm-ar.
Rafael Espindola [Mon, 17 Jun 2013 15:47:20 +0000 (15:47 +0000)]
Move lib/Archive to tools/llvm-ar.

llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't link with the archive library programs that don't use it.
Rafael Espindola [Mon, 17 Jun 2013 15:29:46 +0000 (15:29 +0000)]
Don't link with the archive library programs that don't use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184081 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a testcase for r184074.
Rafael Espindola [Mon, 17 Jun 2013 14:00:41 +0000 (14:00 +0000)]
Add a testcase for r184074.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184080 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix incorrectly finding 'executable' directories instead of files.
Manuel Klimek [Mon, 17 Jun 2013 10:48:34 +0000 (10:48 +0000)]
Fix incorrectly finding 'executable' directories instead of files.

This broke for example the 'not' utility, if a directory called
'FileCheck' is executable and in the path before the actual 'FileCheck'.

This patch steals the implementation of the "old" PathV1 canExecute
implementation:
- checks for R_OK (file readable): this is necessary for executing
  scripts; we should not regress here unless we have good reasons
- checks for S_ISREG; if we want to get rid of this, we'd need to
  change all callers who already made the assumption when depending
  on Path V1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184074 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAArch64: print relocation addends if present on AArch64
Tim Northover [Mon, 17 Jun 2013 03:03:06 +0000 (03:03 +0000)]
AArch64: print relocation addends if present on AArch64

llvm-objdump should provide some way of printing out the addends present in the
.rela sections for debugging purposes if nothing else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184072 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebugInfo: remove target-specific Frame Index handling for DBG_VALUE MachineInstrs
David Blaikie [Sun, 16 Jun 2013 20:34:27 +0000 (20:34 +0000)]
DebugInfo: remove target-specific Frame Index handling for DBG_VALUE MachineInstrs

Frame index handling is now target-agnostic, so delete the target hooks
for creation & asm printing of target-specific addressing in DBG_VALUEs
and any related functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184067 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions
David Blaikie [Sun, 16 Jun 2013 20:34:15 +0000 (20:34 +0000)]
Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions

Rather than using the full power of target-specific addressing modes in
DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This
reduces the complexity of debug info handling down to two
representations of values (reg+offset and frame index+offset) rather
than three or four.

Ideally we could ensure that frame indicies had been eliminated by the
time we reached an assembly or dwarf generation, but I haven't spent the
time to figure out where the FIs are leaking through into that & whether
there's a good place to convert them. Some FI+offset=>reg+offset
conversion is done (see PrologEpilogInserter, for example) which is
necessary for some SelectionDAG assumptions about registers, I believe,
but it might be possible to make this a more thorough conversion &
ensure there are no remaining FIs no matter how instruction selection
is performed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184066 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMachineOperand::setIsDebug should ensure the register is /not/ a definition
David Blaikie [Sun, 16 Jun 2013 20:34:09 +0000 (20:34 +0000)]
MachineOperand::setIsDebug should ensure the register is /not/ a definition

This currently unused function appeared to be asserting in the wrong
direction - DebugValues are never definitions of registers, only uses.
Curiously we don't perform any of these checks for the more common (&
actually used) case of MachineOperand::CreateReg (or other Create
functions).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184065 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSilence warning in Release builds.
Benjamin Kramer [Sun, 16 Jun 2013 11:29:48 +0000 (11:29 +0000)]
Silence warning in Release builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184059 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPut back variable names because they are referenced in the documentation
Dmitri Gribenko [Sun, 16 Jun 2013 03:22:56 +0000 (03:22 +0000)]
Put back variable names because they are referenced in the documentation
comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184051 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebugInfo: follow up to 184045 to constrain the tests further to ensure they don...
David Blaikie [Sat, 15 Jun 2013 16:02:44 +0000 (16:02 +0000)]
DebugInfo: follow up to 184045 to constrain the tests further to ensure they don't contain +0 offsets

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184046 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebugInfo: print DBG_VALUE MachineInstrs with [] for deref and drop the offset when...
David Blaikie [Sat, 15 Jun 2013 15:52:58 +0000 (15:52 +0000)]
DebugInfo: print DBG_VALUE MachineInstrs with [] for deref and drop the offset when it's zero

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184045 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse 0 instead of NULL.
Jakub Staszak [Sat, 15 Jun 2013 12:20:44 +0000 (12:20 +0000)]
Use 0 instead of NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184044 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAPInt: Add a fast case for isAllOnesValue.
Benjamin Kramer [Sat, 15 Jun 2013 11:32:09 +0000 (11:32 +0000)]
APInt: Add a fast case for isAllOnesValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184042 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPruneEH: Only merge attribute sets when used. No functionality change.
Benjamin Kramer [Sat, 15 Jun 2013 10:55:39 +0000 (10:55 +0000)]
PruneEH: Only merge attribute sets when used. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184041 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMissing NDEBUGs.
Andrew Trick [Sat, 15 Jun 2013 05:46:47 +0000 (05:46 +0000)]
Missing NDEBUGs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184039 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: heuristics using the new latency and machine model.
Andrew Trick [Sat, 15 Jun 2013 05:39:19 +0000 (05:39 +0000)]
MI-Sched: heuristics using the new latency and machine model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184038 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSupport BufferSize on ProcResGroup for unified MOp schedulers.
Andrew Trick [Sat, 15 Jun 2013 04:50:06 +0000 (04:50 +0000)]
Support BufferSize on ProcResGroup for unified MOp schedulers.

And add Sandybridge/Haswell resource buffers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184034 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate machine models. Specify buffer sizes for OOO processors.
Andrew Trick [Sat, 15 Jun 2013 04:50:02 +0000 (04:50 +0000)]
Update machine models. Specify buffer sizes for OOO processors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184033 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMachine Model: Add MicroOpBufferSize and resource BufferSize.
Andrew Trick [Sat, 15 Jun 2013 04:49:57 +0000 (04:49 +0000)]
Machine Model: Add MicroOpBufferSize and resource BufferSize.

Replace the ill-defined MinLatency and ILPWindow properties with
with straightforward buffer sizes:
MCSchedMode::MicroOpBufferSize
MCProcResourceDesc::BufferSize

These can be used to more precisely model instruction execution if desired.

Disabled some misched tests temporarily. They'll be reenabled in a few commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184032 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: Rename IssueCount to CurrMOps.
Andrew Trick [Sat, 15 Jun 2013 04:49:49 +0000 (04:49 +0000)]
MI-Sched: Rename IssueCount to CurrMOps.

"Counts" refer to scaled resource counts within a region. CurrMOps is
simply the number of micro-ops to be issue in the current cycle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184031 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: Remove the temporary EnableCopyConstrain flag.
Andrew Trick [Sat, 15 Jun 2013 04:49:46 +0000 (04:49 +0000)]
MI-Sched: Remove the temporary EnableCopyConstrain flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184030 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: added tracking of dependent latency for better heuristics.
Andrew Trick [Sat, 15 Jun 2013 04:49:44 +0000 (04:49 +0000)]
MI-Sched: added tracking of dependent latency for better heuristics.

Heuristics compare the critical path in the scheduled code, called
ExpectedLatency, with the latency of instructions remaining to be
scheduled. There are two ways to look at remaining latency:

(1) Dependent latency includes the latency between unscheduled and
scheduled instructions.

(2) Independent latency is simply the height (bottom-up) or depth
(top-down) of instructions currently in the ready Q.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184029 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: DEBUG: print critical resource.
Andrew Trick [Sat, 15 Jun 2013 04:49:42 +0000 (04:49 +0000)]
MI-Sched: DEBUG: print critical resource.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184028 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSelectionDAG: slightly refactor DAGCombiner::visitSELECT_CC to avoid redudant checks...
Stephen Lin [Sat, 15 Jun 2013 04:03:33 +0000 (04:03 +0000)]
SelectionDAG: slightly refactor DAGCombiner::visitSELECT_CC to avoid redudant checks...

This doesn't really effect performance due to all the relevant calls being transparent but is clearer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184027 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebug Info: Don't print the display name and colon prefix for DEBUG_VALUE comments...
David Blaikie [Sat, 15 Jun 2013 00:33:47 +0000 (00:33 +0000)]
Debug Info: Don't print the display name and colon prefix for DEBUG_VALUE comments if the display name is empty

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184026 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj] Move some classes into anonymous namespaces.
Sean Silva [Sat, 15 Jun 2013 00:31:46 +0000 (00:31 +0000)]
[yaml2obj] Move some classes into anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184025 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj] Add support for sh_link via `Link` key.
Sean Silva [Sat, 15 Jun 2013 00:25:26 +0000 (00:25 +0000)]
[yaml2obj] Add support for sh_link via `Link` key.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184022 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Add SI load support for v[24]i32 and store for v2i32
Tom Stellard [Sat, 15 Jun 2013 00:09:31 +0000 (00:09 +0000)]
R600: Add SI load support for v[24]i32 and store for v2i32

Also add a seperate vector lit test file, since r600 doesn't seem to handle
v2i32 load/store yet, but we can test both for SI.

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184021 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove empty directory.
Rafael Espindola [Fri, 14 Jun 2013 23:27:04 +0000 (23:27 +0000)]
Remove empty directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184020 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove the LLVM specific archive index.
Rafael Espindola [Fri, 14 Jun 2013 23:25:53 +0000 (23:25 +0000)]
Remove the LLVM specific archive index.

Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.

LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:

* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.

* It doesn't interact well with archives having both IL and native objects.

* We probably don't want to be responsible for yet another archive
format variant.

This patch then:

* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.

We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184019 91177308-0d34-0410-b5e6-96231b3b80d8