summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* SimplifyCFG: Don't generate invalid code for switch used to initializeHans Wennborg2012-09-191-9/+8
| | | | | | | | | | | | | two variables where the first variable is returned and the second ignored. I don't think this occurs in practice (other passes should have cleaned up the unused phi node), but it should still be handled correctly. Also make the logic for determining if we should return early less sketchy. llvm-svn: 164225
* IntegerDivision: Style cleanups, avoid warning about mixing || and && ↵Benjamin Kramer2012-09-191-7/+5
| | | | | | without parens. llvm-svn: 164216
* Prevent inlining of callees which allocate lots of memory into a recursive ↵Nadav Rotem2012-09-191-14/+58
| | | | | | | | | | | | | | | | | | caller. Example: void foo() { ... foo(); // I'm recursive! bar(); } bar() { int a[1000]; // large stack size } rdar://10853263 llvm-svn: 164207
* CodeGenPrep: turn lookup tables into switches for some targets.Hans Wennborg2012-09-191-4/+114
| | | | | | | | | | | | | | | | | | | This is a follow-up from r163302, which added a transformation to SimplifyCFG that turns some switches into loads from lookup tables. It was pointed out that some targets, such as GPUs and deeply embedded targets, might not find this appropriate, but SimplifyCFG doesn't have enough information about the target to decide this. This patch adds the reverse transformation to CodeGenPrep: it turns loads from lookup tables back into switches for targets where we do not build jump tables (assuming these are also the targets where lookup tables are inappropriate). Hopefully we will eventually get to have target information in SimplifyCFG, and then this CodeGenPrep transformation can be removed. llvm-svn: 164206
* Remove code for setting the VEX L-bit as a function of operand size from the ↵Craig Topper2012-09-193-22/+2
| | | | | | code emitters and the disassembler table builder. Fix a couple instructions that were still missing VEX_L. llvm-svn: 164204
* whitespace.Nadav Rotem2012-09-191-9/+0
| | | | llvm-svn: 164203
* Add explicit VEX_L tags to all 256-bit instructions. This will allow us to ↵Craig Topper2012-09-193-240/+254
| | | | | | remove code from the code emitters that examined operands to set the L-bit. llvm-svn: 164202
* De-nest if's and fix mix-upSean Silva2012-09-191-41/+37
| | | | | | | | | | | | | | | | | | Two deeply nested if's obscured that the sense of the conditions was mixed up. Amazingly, TableGen's output is exactly the same even with the sense of the tests fixed; it seems that all of TableGen's conversions are symmetric so that the inverted sense was nonetheless correct "by accident". As such, I couldn't come up with a test case. If there does in fact exist a non-symmetric conversion in TableGen's type system, then a test case should be prepared. Despite the symmetry, both if's are left in place for robustness in the face of future changes. Review by Jakob. llvm-svn: 164195
* Tidy up. Minor formatting.Jim Grosbach2012-09-181-3/+2
| | | | llvm-svn: 164182
* Tidy up. 80 columns.Jim Grosbach2012-09-181-2/+6
| | | | llvm-svn: 164181
* comment typoAndrew Trick2012-09-181-1/+1
| | | | llvm-svn: 164180
* Fix the last crasher I've gotten a reproduction for in SROA. This oneChandler Carruth2012-09-181-0/+2
| | | | | | | | | | | from the dragonegg build bots when we turned on the full version of the pass. Included a much reduced test case for this pesky bug, despite bugpoint's uncooperative behavior. Also, I audited all the similar code I could find and didn't spot any other cases where this mistake cropped up. llvm-svn: 164178
* New utility for expanding integer division for targets that don't support it.Michael Ilseman2012-09-182-0/+307
| | | | | | Implementation derived from compiler-rt's implementation of signed and unsigned integer division. llvm-svn: 164173
* MOVi16 (movw) is only legal on cpus with V6T2 support. rdar://12300648Evan Cheng2012-09-181-2/+4
| | | | llvm-svn: 164169
* Fix the isLocalCall() by checking for linker weakness as well.Roman Divacky2012-09-181-1/+2
| | | | llvm-svn: 164155
* TargetSchedule: cleanup computeOperandLatency logic & diagnostics.Andrew Trick2012-09-181-6/+16
| | | | llvm-svn: 164154
* misched: Make ScheduleDAGInstrs use the TargetSchedule interface.Andrew Trick2012-09-181-16/+14
| | | | llvm-svn: 164153
* Revert r164051.Akira Hatanaka2012-09-181-4/+0
| | | | llvm-svn: 164150
* LSR critical edge splitting fix for PR13756.Andrew Trick2012-09-181-11/+15
| | | | llvm-svn: 164147
* Fix getCommonType in a different way from the way I fixed it whenChandler Carruth2012-09-181-1/+1
| | | | | | | | | | | | working on FCA splitting. Instead of refusing to form a common type when there are uses of a subsection of the alloca as well as a use of the entire alloca, just skip the subsection uses and continue looking for a whole-alloca use with a type that we can use. This produces slightly prettier IR I think, and also fixes the other failure in the test. llvm-svn: 164146
* Fix build for compilers that don't understand injected class names properly.Benjamin Kramer2012-09-181-2/+2
| | | | llvm-svn: 164142
* Avoid symbol name clash when filling TOC.Roman Divacky2012-09-182-3/+14
| | | | | | Patch by Adhemerval Zanella. llvm-svn: 164141
* SROA: Use CRTP for OpSplitter to get rid of virtual dispatch and the ↵Benjamin Kramer2012-09-181-8/+7
| | | | | | virtual-dtor warnings that come with it. llvm-svn: 164140
* On PPC64 emit the environment pointer. Patch by Adhemerval Zanella.Roman Divacky2012-09-181-0/+2
| | | | llvm-svn: 164139
* Optimize local func calls to not emit nop for TOC restoration.Roman Divacky2012-09-181-2/+10
| | | | | | Patch by Adhemerval Zanella. llvm-svn: 164138
* SROA: Replace the member function template contraption for recursively ↵Benjamin Kramer2012-09-181-97/+105
| | | | | | | | splitting aggregates into a real class. No intended functionality change. llvm-svn: 164135
* When creating MCAsmBackend pass the CPU string as well. In X86AsmBackendRoman Divacky2012-09-1811-43/+61
| | | | | | | | | store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. llvm-svn: 164132
* SROA.cpp: Appease msvc.NAKAMURA Takumi2012-09-181-1/+1
| | | | | | ...I don't know why this could appease msvc...baad. llvm-svn: 164130
* LNT builders have picked up new SROA, disable it to get the remaining ↵Benjamin Kramer2012-09-181-1/+1
| | | | | | builders green again. llvm-svn: 164124
* Fix a warning in release builds and a test case I forgot to update withChandler Carruth2012-09-181-0/+1
| | | | | | a fix to getCommonType in the previous patch. llvm-svn: 164120
* Add a major missing piece to the new SROA pass: aggressive splitting ofChandler Carruth2012-09-182-8/+221
| | | | | | | | | | | | | | | | | | | | | | | FCAs. This is essential in order to promote allocas that are used in struct returns by frontends like Clang. The FCA load would block the rest of the pass from firing, resulting is significant regressions with the bullet benchmark in the nightly test suite. Thanks to Duncan for repeated discussions about how best to do this, and to both him and Benjamin for review. This appears to have blocked many places where the pass tries to fire, and so I'm expect somewhat different results with this fix added. As with the last big patch, I'm including a change to enable the SROA by default *temporarily*. Ben is going to remove this as soon as the LNT bots pick up the patch. I'm just trying to get a round of LNT numbers from the stable machines in the lab. NOTE: Four clang tests are expected to fail in the brief window where this is enabled. Sorry for the noise! llvm-svn: 164119
* Fix instcombine to obey requested alignment when merging allocas.Richard Osborne2012-09-181-3/+7
| | | | llvm-svn: 164117
* More domain conversion; convert VFP VMOVS to NEON instructions in more cases ↵James Molloy2012-09-181-13/+56
| | | | | | - when we may clobber the other S-lane by converting an S to a D instruction, make an effort to work out if the S lane is clobberable or not. llvm-svn: 164114
* Replaced ReInitMCSubtargetInfo with InitMCProcessor.Andrew Trick2012-09-181-14/+15
| | | | | | | | Now where we used to call ReInitMCSubtargetInfo, we actually recompute the same information as InitMCSubtargetInfo instead of only setting the feature bits. llvm-svn: 164105
* TargetSchedModel API. Implement latency lookup, disabled.Andrew Trick2012-09-183-8/+148
| | | | llvm-svn: 164098
* TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine ↵Andrew Trick2012-09-182-2/+11
| | | | | | model. llvm-svn: 164092
* Mark unimplemented copy constructors and copy assignment operators as ↵Craig Topper2012-09-185-11/+10
| | | | | | LLVM_DELETED_FUNCTION. llvm-svn: 164090
* Use vld1 / vst2 for unaligned v2f64 load / store. e.g. Use vld1.16 for 2-byteEvan Cheng2012-09-182-5/+42
| | | | | | | | | aligned address. Based on patch by David Peixotto. Also use vld1.64 / vst1.64 with 128-bit alignment to take advantage of alignment hints. rdar://12090772, rdar://12238782 llvm-svn: 164089
* Fix some funky indentation.Evan Cheng2012-09-181-18/+17
| | | | llvm-svn: 164087
* PGO: preserve branch-weight metadata when simplifying Switch to a sub, an icmpManman Ren2012-09-181-1/+38
| | | | | | and a conditional branch; also when removing dead cases from a switch. llvm-svn: 164084
* PGO: preserve branch-weight metadata when simplifying SwitchManman Ren2012-09-171-0/+15
| | | | | | | Hanlde the case when we split the default edge if the default target has "icmp" and unconditinal branch. llvm-svn: 164076
* Merge into undefined lanes under -new-coalescer.Jakob Stoklund Olesen2012-09-172-2/+120
| | | | | | | | | | | | | | | | | Add LIS::pruneValue() and extendToIndices(). These two functions are used by the register coalescer when merging two live ranges requires more than a trivial value mapping as supported by LiveInterval::join(). The pruneValue() function can remove the part of a value number that is going to conflict in join(). Afterwards, extendToIndices can restore the live range, using any new dominating value numbers and updating the SSA form. Use this complex value mapping to support merging a register into a vector lane that has a conflicting value, but the clobbered lane is undef. llvm-svn: 164074
* Stop adding <imp-def> operands when expanding REG_SEQUENCE.Jakob Stoklund Olesen2012-09-171-4/+0
| | | | | | | | | | These extra operands are not needed by register allocators using VirtRegRewriter, and RAFast don't need them any longer. By omitting the <imp-def> operands, it becomes possible for the new register coalescer to track which lanes are valid and which are undef. llvm-svn: 164073
* Revert r164061-r164067. Most of the new subtarget emitter.Andrew Trick2012-09-174-172/+22
| | | | | | | I have to work out the Target/CodeGen header dependencies before putting this back. llvm-svn: 164072
* PGO: preserve branch-weight metadata when simplifying SwitchOnSelect.Manman Ren2012-09-171-5/+28
| | | | llvm-svn: 164068
* InitMCProcessorAndrew Trick2012-09-171-14/+15
| | | | llvm-svn: 164066
* TargetSchedModel API. Implement latency lookup, disabled.Andrew Trick2012-09-173-8/+148
| | | | llvm-svn: 164065
* TableGen subtarget emitter. Initialize MCSubtargetInfo with the new machine ↵Andrew Trick2012-09-172-2/+11
| | | | | | model. llvm-svn: 164061
* Add some cases to x86 OptimizeCompare to handle DEC and INC, too.Jan Wen Voung2012-09-171-4/+14
| | | | | | While we are setting the earlier def to true, also make it live. llvm-svn: 164056
* PGO: preserve branch-weight metadata when simplifying two branches with a commonManman Ren2012-09-171-0/+27
| | | | | | destination in SimplifyCondBranchToCondBranch. llvm-svn: 164054
OpenPOWER on IntegriCloud