summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Misc cleanup; addresses Duncan's comments on r138877.Eli Friedman2011-08-314-22/+17
| | | | llvm-svn: 138887
* Fill in type legalization for MERGE_VALUES in all the various cases. Patch ↵Eli Friedman2011-08-316-18/+77
| | | | | | by Micah Villmow. (No testcase because the issue only showed up in an out-of-tree backend.) llvm-svn: 138877
* Generic expansion for atomic load/store into cmpxchg/atomicrmw xchg; ↵Eli Friedman2011-08-312-0/+33
| | | | | | implements 64-bit atomic load/store for ARM. llvm-svn: 138872
* Compress Repeated Byte OutputDavid Greene2011-08-311-3/+59
| | | | | | | Emit a repeated sequence of bytes using .zero. This saves an enormous amount of asm file space for certain programs. llvm-svn: 138864
* Spelling and grammar fixes to problems found by Duncan.Rafael Espindola2011-08-311-4/+4
| | | | llvm-svn: 138858
* Emit segmented-stack specific code into function prologues forRafael Espindola2011-08-301-0/+8
| | | | | | | | | | | | X86. Modify the pass added in the previous patch to call this new code. This new prologues generated will call a libgcc routine (__morestack) to allocate more stack space from the heap when required Patch by Sanjoy Das. llvm-svn: 138812
* Follow up to r138791.Evan Cheng2011-08-302-0/+14
| | | | | | | | | | | | Add a instruction flag: hasPostISelHook which tells the pre-RA scheduler to call a target hook to adjust the instruction. For ARM, this is used to adjust instructions which may be setting the 's' flag. ADC, SBC, RSB, and RSC instructions have implicit def of CPSR (required since it now uses CPSR physical register dependency rather than "glue"). If the carry flag is used, then the target hook will *fill in* the optional operand with CPSR. Otherwise, the hook will remove the CPSR implicit def from the MachineInstr. llvm-svn: 138810
* Do not try to rematerialize a value from a partial definition.Bob Wilson2011-08-301-1/+22
| | | | | | | I don't currently have a good testcase for this; will try to get one tomorrow. <rdar://problem/10032939> llvm-svn: 138794
* Thumb2 parsing and encoding for IT blocks.Jim Grosbach2011-08-291-0/+4
| | | | llvm-svn: 138773
* Fix PR5329: pay attention to constructor/destructor priorityDuncan Sands2011-08-281-13/+36
| | | | | | | when outputting them. With this, the entire LLVM testsuite passes when built with dragonegg. llvm-svn: 138724
* These splits should be done whether they are critical edges or not.Bill Wendling2011-08-271-16/+8
| | | | llvm-svn: 138697
* Update the dominator tree with the correct dominator for the new 'unwind' block.Bill Wendling2011-08-261-0/+5
| | | | llvm-svn: 138664
* Split the landing pad block only if it's a critical edge. Also intelligentlyBill Wendling2011-08-261-5/+21
| | | | | | split it in the other place where we're splitting critical edges. llvm-svn: 138658
* Atomic load/store on ARM/Thumb.Eli Friedman2011-08-262-5/+27
| | | | | | | | | | | | I don't really like the patterns, but I'm having trouble coming up with a better way to handle them. I plan on making other targets use the same legalization ARM-without-memory-barriers is using... it's not especially efficient, but if anyone cares, it's not that hard to fix for a given target if there's some better lowering. llvm-svn: 138621
* Look at only the terminators of the basic block. Also, if we're using the new EHBill Wendling2011-08-251-5/+9
| | | | | | | scheme, return 'true' so that it doesn't try to run the old EH scheme's fixup on the new code. llvm-svn: 138605
* Basic x86 code generation for atomic load and store instructions.Eli Friedman2011-08-244-12/+147
| | | | llvm-svn: 138478
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-242-2/+2
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Tidy up. Trailing whitespace.Jim Grosbach2011-08-241-31/+31
| | | | llvm-svn: 138437
* Add the sentinal "no handle" value to the ResumeInst.Bill Wendling2011-08-241-0/+2
| | | | | | | | A value of -1 at a call site tells the personality function that this call isn't handled by the current function. Since the ResumeInsts are converted to calls to _Unwind_SjLj_Resume, add a (volatile) store of -1 to its 'call site'. llvm-svn: 138416
* Don't replace *all* uses with the new stuff.Bill Wendling2011-08-231-1/+1
| | | | | | | | This is not necessarily the first or dominating use of the EH values. The IR breaks if it's not. So replace the specific value in the instruction with the new value. llvm-svn: 138406
* Look at the end of the entry block for an invoke.Bill Wendling2011-08-231-4/+17
| | | | | | | | The invoke could be at the end of the entry block. If it's the only one, then we won't process all of the landingpad instructions correctly. This code is currently ugly, but should be made much nicer once the new EH switch is thrown. llvm-svn: 138397
* A landingpad instruction is neither folded nor dead.Bill Wendling2011-08-231-0/+1
| | | | llvm-svn: 138387
* Fix 80 col violations.Evan Cheng2011-08-231-2/+4
| | | | llvm-svn: 138356
* Split the landing pad's edge. Then for all uses of a landingpad instruction'sBill Wendling2011-08-221-2/+74
| | | | | | | | | | value, we insert a load of the exception object and selector object from memory, which is where it actually resides. If it's used by a PHI node, we follow that to where it is being used. Eventually, all landingpad instructions should have no uses. Any PHI nodes that were associated with those landingpads should be removed. llvm-svn: 138302
* Follow up to Jim's r138278. This fixes commuteInstruction so it handles ↵Evan Cheng2011-08-221-10/+12
| | | | | | two-address instructions correctly. I'll let Jim add a test case. :-) llvm-svn: 138289
* Some whitespace fixes and #include reordering.Bill Wendling2011-08-221-8/+5
| | | | llvm-svn: 138256
* Be less redundant.Nick Lewycky2011-08-221-1/+0
| | | | llvm-svn: 138252
* Do not use named md nodes to track variables that are completely optimized. ↵Devang Patel2011-08-191-36/+23
| | | | | | This does not scale while doing LTO with debug info. New approach is to include list of variables in the subprogram info directly. llvm-svn: 138145
* Roll back the rest of r126557. It's a hack that will break in some obscure ↵Benjamin Kramer2011-08-191-6/+0
| | | | | | cases. llvm-svn: 138130
* Eli points out that this is what report_fatal_error() is for.Nick Lewycky2011-08-191-1/+2
| | | | llvm-svn: 138091
* This is not actually unreachable, so don't use llvm_unreachable for it. SinceNick Lewycky2011-08-191-1/+2
| | | | | | | | | | the intent seems to be to terminate even in Release builds, just use abort() directly. If program flow ever reaches a __builtin_unreachable (which llvm_unreachable is #define'd to on newer GCCs) then the program is undefined. llvm-svn: 138068
* Add llc flags to disable machine DCE and CSE.Jakob Stoklund Olesen2011-08-191-2/+8
| | | | | | This is useful for unit tests. llvm-svn: 138028
* Make a bunch of symbols private.Benjamin Kramer2011-08-192-2/+2
| | | | llvm-svn: 138025
* Don't treat a partial <def,undef> operand as a read.Jakob Stoklund Olesen2011-08-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Normally, a partial register def is treated as reading the super-register unless it also defines the full register like this: %vreg110:sub_32bit<def> = COPY %vreg77:sub_32bit, %vreg110<imp-def> This patch also uses the <undef> flag on partial defs to recognize non-reading operands: %vreg110:sub_32bit<def,undef> = COPY %vreg77:sub_32bit This fixes a subtle bug in RegisterCoalescer where LIS->shrinkToUses would treat a coalesced copy as still reading the register, extending the live range artificially. My test case only works when I disable DCE so a dead copy is left for RegisterCoalescer, so I am not including it. <rdar://problem/9967101> llvm-svn: 138018
* add the comments of each declaration follow it, making it easier to read and ↵Renato Golin2011-08-181-49/+44
| | | | | | compare to GCC's result. llvm-svn: 138009
* Eliminate unnecessary forwarding function.Devang Patel2011-08-183-19/+6
| | | | llvm-svn: 138006
* Add new DIE into the map asap.Devang Patel2011-08-181-8/+6
| | | | llvm-svn: 137998
* FastISel: avoid function calls between the materialization of the constant ↵Ivan Krasin2011-08-181-5/+20
| | | | | | and its use. llvm-svn: 137993
* Add the support in code-gen for the landingpad instruction lowering.Bill Wendling2011-08-172-3/+70
| | | | | | | | | | The landingpad instruction is lowered into the EXCEPTIONADDR and EHSELECTION SDNodes. The information from the landingpad instruction is harvested by the 'AddLandingPadInfo' function. The new EH uses the current EH scheme in the back-end. This will change once we switch over to the new scheme. (Reviewed by Jakob!) llvm-svn: 137880
* Revert patch. Forgot a dependent commit.Bill Wendling2011-08-171-39/+3
| | | | llvm-svn: 137875
* Add the body of 'visitLandingPad'.Bill Wendling2011-08-171-3/+39
| | | | | | | | This generates the SDNodes for the new exception handling scheme. It takes the two values coming from the landingpad instruction and assigns them to the EXCEPTIONADDR and EHSELECTION nodes. llvm-svn: 137873
* Modify for the new EH scheme.Bill Wendling2011-08-171-1/+57
| | | | | | | | Things are much saner now. We no longer need to modify the laning pads, because of the invariants we impose upon them. The only thing DwarfEHPrepare needs to do is convert the 'resume' instruction into a call to '_Unwind_Resume'. llvm-svn: 137855
* Until now all debug info MDNodes referred to a root MDNode, a compile unit. ↵Devang Patel2011-08-164-99/+96
| | | | | | | | This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL. MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up. llvm-svn: 137778
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-161-1/+1
| | | | | | The argument is unused, and is a layering violation in any case. llvm-svn: 137735
* Remove unnecessary version check.Devang Patel2011-08-161-2/+1
| | | | llvm-svn: 137728
* Revert r137562 because it caused PR10674Nadav Rotem2011-08-161-7/+0
| | | | llvm-svn: 137719
* Refactor.Devang Patel2011-08-152-49/+68
| | | | llvm-svn: 137689
* Continue to hoist uses of getCompileUnit() up. The goal is to get rid of ↵Devang Patel2011-08-152-21/+24
| | | | | | uses of getCompileUnit(). llvm-svn: 137683
* This is somewhat déjà-vu, but avoid using getCompileUnit() as much as ↵Devang Patel2011-08-152-14/+14
| | | | | | possible. llvm-svn: 137668
* Refactor. Variables are part of compile unit so let CompileUnit create new ↵Devang Patel2011-08-154-123/+129
| | | | | | variable. llvm-svn: 137663
OpenPOWER on IntegriCloud