Commit Graph

84756 Commits

Author SHA1 Message Date
Nadav Rotem 8ff00989fc Stack coloring: remove lifetime intervals which contain escaped allocas.
The input program may contain intructions which are not inside lifetime
markers. This can happen due to a bug in the compiler or due to a bug in
user code (for example, returning a reference to a local variable).
This commit adds checks that all of the instructions in the function and
invalidates lifetime ranges which do not contain all of the instructions.

llvm-svn: 163678
2012-09-12 04:57:37 +00:00
Eric Christopher 97c0fdd116 Add some support for dealing with an object pointer on arguments.
Part of rdar://9797999

llvm-svn: 163667
2012-09-12 00:26:55 +00:00
Owen Anderson 16ba4b2d83 Improve tblgen code cleanliness: create an unknown_class, from which the unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
llvm-svn: 163664
2012-09-11 23:47:08 +00:00
Owen Anderson ccd682c695 Compute a map from register names to registers, rather than scanning the list of registers every time we want to look up a register by name.
llvm-svn: 163659
2012-09-11 23:32:17 +00:00
Chad Rosier e65effe382 Add documentation.
llvm-svn: 163658
2012-09-11 23:20:20 +00:00
Chad Rosier 03efc5e1ee Add a few virtual functions to the abstract MCParsedAsmOperand class.
llvm-svn: 163655
2012-09-11 23:03:44 +00:00
Chad Rosier 4109983fbc Rename the isMemory() function to isMem(). No functional change intended.
llvm-svn: 163654
2012-09-11 23:02:35 +00:00
Manman Ren 19f49ac624 Release build: guard dump functions with
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163339.

llvm-svn: 163653
2012-09-11 22:23:19 +00:00
Chad Rosier b6b8e966d6 StringSwitchify.
llvm-svn: 163649
2012-09-11 21:10:25 +00:00
Chad Rosier 30888b176a Simplify logic. No functional change intended.
llvm-svn: 163648
2012-09-11 20:57:04 +00:00
Chad Rosier 1778831a3d [ms-inline asm] Split the parsing of IR asm strings into GCC and MS variants.
Add support in the EmitMSInlineAsmStr() function for handling integer consts.

llvm-svn: 163645
2012-09-11 19:09:56 +00:00
Manman Ren 571d9e4b80 SimplifyCFG: preserve branch-weight metadata when creating a new switch from
a pair of switch/branch where both depend on the value of the same variable and
the default case of the first switch/branch goes to the second switch/branch.

Code clean up and fixed a few issues:
1> handling the case where some cases of the 2nd switch are invalidated
2> correctly calculate the weight for the 2nd switch when it is a conditional eq

Testing case is modified from Alastair's original patch.

llvm-svn: 163635
2012-09-11 17:43:35 +00:00
Jakob Stoklund Olesen d346d4871a Add TRI::getSubRegIndexLaneMask().
Sub-register lane masks are bitmasks that can be used to determine if
two sub-registers of a virtual register will overlap. For example, ARM's
ssub0 and ssub1 sub-register indices don't overlap each other, but both
overlap dsub0 and qsub0.

The lane masks will be accurate on most targets, but on targets that use
sub-register indexes in an irregular way, the masks may conservatively
report that two sub-register indices overlap when the eventually
allocated physregs don't.

Irregular register banks also mean that the bits in a lane mask can't be
mapped onto register units, but the concept is similar.

llvm-svn: 163630
2012-09-11 16:34:08 +00:00
Jakob Stoklund Olesen dd40fda52d Clean the sub-reg index composition maps at emission.
Preserve the Composites map in the CodeGenSubRegIndex class so it can be
used to determine which sub-register indices can actually be composed.

llvm-svn: 163629
2012-09-11 16:34:05 +00:00
Jakob Stoklund Olesen 21e2f1c6e5 Add MCRI::getNumSubRegIndices() and start checking SubRegIndex ranges.
Apparently, NumSubRegIndices was completely unused before. Adjust it by
one to include the null subreg index, just like getNumRegs() includes
the null register.

llvm-svn: 163628
2012-09-11 16:34:02 +00:00
Chad Rosier ab51c9de34 Formatting. No functional change intended.
llvm-svn: 163627
2012-09-11 16:33:10 +00:00
Nadav Rotem 42b641c879 Dragonegg selfhost exposed additional cases where alloca usage moved outside of lifetime markers. Disabling the pass for now.
llvm-svn: 163623
2012-09-11 15:40:27 +00:00
Nadav Rotem 4464613ceb Enable stack coloring.
llvm-svn: 163617
2012-09-11 13:48:35 +00:00
Nadav Rotem 65ba95ebf9 Stack Coloring: Dont crash on dbg values which use stack frames.
llvm-svn: 163616
2012-09-11 12:34:27 +00:00
Evgeniy Stepanov 68f23444b4 CMake toolchain file for Android NDK.
llvm-svn: 163612
2012-09-11 11:54:27 +00:00
Duncan Sands 69a56fffae Add IRC handle.
llvm-svn: 163601
2012-09-11 07:50:40 +00:00
Craig Topper a29ed865d0 Make a bunch of lowering helper functions static instead of member functions. No functional change.
llvm-svn: 163596
2012-09-11 06:15:32 +00:00
Craig Topper 8702c5b7c0 Change unsigned to a uint16_t in static disassembler tables to reduce the table size.
llvm-svn: 163594
2012-09-11 04:19:21 +00:00
NAKAMURA Takumi 7419c5fb45 llvm/lib/Transforms/Utils/CMakeLists.txt: Update.
llvm-svn: 163593
2012-09-11 02:55:37 +00:00
Alex Rosenberg 04b43aab43 Add a pass that renames everything with metasyntatic names. This works well after using bugpoint to reduce the confusion presented by the original names, which no longer mean what they used to.
llvm-svn: 163592
2012-09-11 02:46:18 +00:00
Craig Topper 8238461211 Teach DAG combiner to constant fold FABS of a BUILD_VECTOR of ConstantFPs. Factor similar code out of FNEG DAG combiner.
llvm-svn: 163587
2012-09-11 01:45:21 +00:00
Chandler Carruth a699b6a44c Add support for finding cacheflush on OpenBSD/mips64 platforms.
Patch by Brad Smith!

llvm-svn: 163584
2012-09-11 01:17:24 +00:00
Andrew Trick 7a8e10042f Reorganize MachineScheduler interfaces and publish them in the header.
The Hexagon target decided to use a lot of functionality from the
target-independent scheduler. That's fine, and other targets should be
able to do the same. This reorg and API update makes that easy.

For the record, ScheduleDAGMI was not meant to be subclassed. Instead,
new scheduling algorithms should be able to implement
MachineSchedStrategy and be done. But if need be, it's nice to be
able to extend ScheduleDAGMI, so I also made that easier. The target
scheduler is somewhat more apt to break that way though.

llvm-svn: 163580
2012-09-11 00:39:15 +00:00
Andrew Trick 822b71568b Remove unused declaration
llvm-svn: 163579
2012-09-11 00:39:12 +00:00
Eric Christopher 9fd70c8fb3 Revert r160148 it seems to cause more problems than it should
right now. We'll fix PR13303 a different way.

llvm-svn: 163570
2012-09-10 23:34:06 +00:00
Eric Christopher e8a7b1b741 80-col fixup.
llvm-svn: 163569
2012-09-10 23:34:03 +00:00
Eric Christopher abb4d9ed34 80-col fixup.
llvm-svn: 163568
2012-09-10 23:34:00 +00:00
Eric Christopher a47d096125 No reason to construct this twice.
llvm-svn: 163567
2012-09-10 23:33:57 +00:00
Chad Rosier e27921feb8 Add newline.
llvm-svn: 163565
2012-09-10 23:09:27 +00:00
Chad Rosier 38e05a9eb2 Update function names to conform to guidelines. No functional change intended.
llvm-svn: 163561
2012-09-10 22:50:57 +00:00
Chad Rosier 41ff85d754 Revert r163556. Missed updates to tablegen files.
llvm-svn: 163557
2012-09-10 22:30:35 +00:00
Chad Rosier 2089c49db7 Update function names to conform to guidelines. No functional change intended.
llvm-svn: 163556
2012-09-10 22:23:45 +00:00
NAKAMURA Takumi 8c72306cdb test/CodeGen/X86/ms-inline-asm.ll: Relax for non-darwin x86 targets. '##InlineAsm' could not be seen in other hosts.
llvm-svn: 163554
2012-09-10 22:04:54 +00:00
Chad Rosier 7641f58784 [ms-inline asm] Properly emit the asm directives when the AsmPrinterVariant
and InlineAsmVariant don't match.

llvm-svn: 163550
2012-09-10 21:36:05 +00:00
Chad Rosier 1c1319b9e7 Update test case for Release builds.
llvm-svn: 163549
2012-09-10 21:31:43 +00:00
Dmitri Gribenko ca1e27be0d Remove redundant semicolons which are null statements.
llvm-svn: 163547
2012-09-10 21:26:47 +00:00
Nadav Rotem 5a72a23a70 Disable stack coloring because it makes dragonegg fail bootstrapping.
llvm-svn: 163545
2012-09-10 21:17:58 +00:00
Chad Rosier db20a41d99 [ms-inline asm] Pass the correct AsmVariant to the PrintAsmOperand() function
and update the printOperand() function accordingly.

llvm-svn: 163544
2012-09-10 21:10:49 +00:00
Chad Rosier 6f8d8b2406 [ms-inline asm] Add support for .att_syntax directive.
llvm-svn: 163542
2012-09-10 20:54:39 +00:00
Nadav Rotem 107faf853b Enable stack coloring.
llvm-svn: 163539
2012-09-10 20:15:49 +00:00
Jakob Stoklund Olesen 8b9dce5c18 Don't attempt to use flags from predicated instructions.
The ARM backend can eliminate cmp instructions by reusing flags from a
nearby sub instruction with similar arguments.

Don't do that if the sub is predicated - the flags are not written
unconditionally.

<rdar://problem/12263428>

llvm-svn: 163535
2012-09-10 19:17:25 +00:00
Michael J. Spencer 7307fea911 [Object] Extract Elf_Ehdr. Patch by Hemant Kulkarni!
llvm-svn: 163532
2012-09-10 19:04:02 +00:00
Nadav Rotem 3c86b78ae4 Stack Coloring: Handle the case where END markers come before BEGIN markers properly.
llvm-svn: 163530
2012-09-10 18:51:09 +00:00
Michael Liao 400f7ef871 Enhance PR11334 fix to support extload from v2f32/v4f32
- Fix an remaining issue of PR11674 as well

llvm-svn: 163528
2012-09-10 18:33:51 +00:00
Sergei Larin ef4cc11cf9 Add "blocked" heuristic to the Hexagon MI scheduler.
Improve AQ instruction selection in the Hexagon MI scheduler.

llvm-svn: 163523
2012-09-10 17:31:34 +00:00