summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-commit r151623 with fix. Only issue special no-return calls if it's a ↵Evan Cheng2012-02-281-3/+4
| | | | | | direct call. llvm-svn: 151645
* Revert r151623 "Some ARM implementaions, e.g. A-series, does return stack ↵Daniel Dunbar2012-02-281-4/+3
| | | | | | prediction. ...", it is breaking the Clang build during the Compiler-RT part. llvm-svn: 151630
* Some ARM implementaions, e.g. A-series, does return stack prediction. That is,Evan Cheng2012-02-281-3/+4
| | | | | | | | | | | | | | | | | the processor keeps a return addresses stack (RAS) which stores the address and the instruction execution state of the instruction after a function-call type branch instruction. Calling a "noreturn" function with normal call instructions (e.g. bl) can corrupt RAS and causes 100% return misprediction so LLVM should use a unconditional branch instead. i.e. mov lr, pc b _foo The "mov lr, pc" is issued in order to get proper backtrace. rdar://8979299 llvm-svn: 151623
* Make all pointers to TargetRegisterClass const since they are all pointers ↵Craig Topper2012-02-221-1/+1
| | | | | | to static data that should not be modified. llvm-svn: 151134
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-2/+1
| | | | llvm-svn: 149961
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* Remove a bunch of unused variable assignments.Benjamin Kramer2012-01-201-2/+1
| | | | | | Found by the clang static analyzer. llvm-svn: 148541
* Return an ArrayRef from ShuffleVectorSDNode::getMask and push it through ↵Benjamin Kramer2012-01-151-2/+1
| | | | | | CodeGen. llvm-svn: 148218
* Remove VectorExtras. This unused helper was written for a type of API that ↵Benjamin Kramer2012-01-071-1/+0
| | | | | | is discouraged now. llvm-svn: 147738
* Initial CodeGen support for CTTZ/CTLZ where a zero input produces anChandler Carruth2011-12-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | undefined result. This adds new ISD nodes for the new semantics, selecting them when the LLVM intrinsic indicates that the undef behavior is desired. The new nodes expand trivially to the old nodes, so targets don't actually need to do anything to support these new nodes besides indicating that they should be expanded. I've done this for all the operand types that I could figure out for all the targets. Owners of various targets, please review and let me know if any of these are incorrect. Note that the expand behavior is *conservatively correct*, and exactly matches LLVM's current behavior with these operations. Ideally this patch will not change behavior in any way. For example the regtest suite finds the exact same instruction sequences coming out of the code generator. That's why there are no new tests here -- all of this is being exercised by the existing test suite. Thanks to Duncan Sands for reviewing the various bits of this patch and helping me get the wrinkles ironed out with expanding for each target. Also thanks to Chris for clarifying through all the discussions that this is indeed the approach he was looking for. That said, there are likely still rough spots. Further review much appreciated. llvm-svn: 146466
* Teach SelectionDAG to match more calls to libm functions onto existing ↵Owen Anderson2011-12-081-0/+7
| | | | | | SDNodes. Mark these nodes as illegal by default, unless the target declares otherwise. llvm-svn: 146171
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-021-10/+16
| | | | | | | | | | | | change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. llvm-svn: 145714
* add basic PPC register-pressure feedback; adjust the vaarg test to match the ↵Hal Finkel2011-11-221-0/+2
| | | | | | new register-allocation pattern llvm-svn: 145065
* Remove some unnecessary includes of PseudoSourceValue.h.Jay Foad2011-11-151-1/+0
| | | | llvm-svn: 144631
* Added invariant field to the DAG.getLoad method and changed all calls.Pete Cooper2011-11-081-21/+26
| | | | | | When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses llvm-svn: 144100
* Rename NonScalarIntSafe to something more appropriate.Lang Hames2011-10-261-2/+2
| | | | llvm-svn: 143080
* Revert change to function alignment b/c existing logic was fineHal Finkel2011-10-171-10/+3
| | | | llvm-svn: 142224
* Instructions for Book E PPC should be word aligned, set function alignment ↵Hal Finkel2011-10-171-3/+10
| | | | | | to reflect this llvm-svn: 142194
* Add an implementation of the CanLowerReturn function to the PPC backendHal Finkel2011-10-141-0/+11
| | | | llvm-svn: 141981
* Add codegen support for vector select (in the IR this means a selectDuncan Sands2011-09-061-1/+2
| | | | | | | | | | | | with a vector condition); such selects become VSELECT codegen nodes. This patch also removes VSETCC codegen nodes, unifying them with SETCC nodes (codegen was actually often using SETCC for vector SETCC already). This ensures that various DAG combiner optimizations kick in for vector comparisons. Passes dragonegg bootstrap with no testsuite regressions (nightly testsuite as well as "make check-all"). Patch mostly by Nadav Rotem. llvm-svn: 139159
* Split the init.trampoline intrinsic, which currently combines GCC'sDuncan Sands2011-09-061-9/+13
| | | | | | | | | | | | | | | | | | | | init.trampoline and adjust.trampoline intrinsics, into two intrinsics like in GCC. While having one combined intrinsic is tempting, it is not natural because typically the trampoline initialization needs to be done in one function, and the result of adjust trampoline is needed in a different (nested) function. To get around this llvm-gcc hacks the nested function lowering code to insert an additional parent variable holding the adjust.trampoline result that can be accessed from the child function. Dragonegg doesn't have the luxury of tweaking GCC code, so it stored the result of adjust.trampoline in the memory GCC set aside for the trampoline itself (this is always available in the child function), and set up some new memory (using an alloca) to hold the trampoline. Unfortunately this breaks Go which allocates trampoline memory on the heap and wants to use it even after the parent has exited (!). Rather than doing even more hacks to get Go working, it seemed best to just use two intrinsics like in GCC. Patch mostly by Sanjoy Das. llvm-svn: 139140
* Set CR1EQ only when lowering vararg floating arguments (not any varargRoman Divacky2011-08-301-2/+6
| | | | | | arguments as before), unset CR1EQ otherwise. llvm-svn: 138802
* Expand ATOMIC_LOAD and ATOMIC_STORE for architectures I don't know well ↵Eli Friedman2011-08-291-0/+3
| | | | | | enough to fix properly. llvm-svn: 138751
* New approach to r136737: insert the necessary fences for atomic ops in ↵Eli Friedman2011-08-031-0/+2
| | | | | | | | platform-independent code, since a bunch of platforms (ARM, Mips, PPC, Alpha are the relevant targets here) need to do essentially the same thing. I think this completes the basic CodeGen for atomicrmw and cmpxchg. llvm-svn: 136813
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-261-1/+1
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
* Set PPCII::MO_DARWIN_STUB only on MacOSX < 10.5.Roman Divacky2011-07-241-2/+2
| | | | llvm-svn: 135866
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-5/+5
| | | | llvm-svn: 135375
* Add an intrinsic and codegen support for fused multiply-accumulate. The intentCameron Zwarich2011-07-081-0/+2
| | | | | | is to use this for architectures that have a native FMA instruction. llvm-svn: 134742
* Remove accidentaly left node from previous iteration of the patch.Roman Divacky2011-07-041-3/+0
| | | | | | Noticed by Benjamin Kramer! llvm-svn: 134376
* Implement ISD::VAARG lowering on PPC32.Roman Divacky2011-06-281-5/+123
| | | | llvm-svn: 134005
* Fix a few places where 32bit instructions/registerset were used on PPC64.Roman Divacky2011-06-171-3/+11
| | | | llvm-svn: 133260
* PR10136: fix PPCTargetLowering::LowerCall_SVR4 so that a necessary CopyToReg ↵Eli Friedman2011-06-141-7/+6
| | | | | | | | doesn't appear to be dead. Roman, since you're writing tests for other PPC-SVR4 vararg-related stuff, would you mind writing a test for this? llvm-svn: 133018
* Add a parameter to CCState so that it can access the MachineFunction.Eric Christopher2011-06-081-17/+17
| | | | | | | | No functional change. Part of PR6965 llvm-svn: 132763
* Fix wrong usages of CTR/MCTR where CTR8/MCTR8 was meant.Roman Divacky2011-06-031-1/+1
| | | | | | | | | | | | | - Check for MTCTR8 in addition to MTCTR when looking up a hazard. - When lowering an indirect call use CTR8 when targeting 64bit. - Introduce BCTR8 that uses CTR8 and use it on 64bit when expanding ISD::BRIND. The last change fixes PR8487. With those changes, we are able to compile a running "ls" and "sh" on FreeBSD/PowerPC64. llvm-svn: 132552
* Have LowerOperandForConstraint handle multiple character constraints.Eric Christopher2011-06-021-2/+8
| | | | | | Part of rdar://9119939 llvm-svn: 132510
* Make CodeGen/PowerPC/2007-09-11-RegCoalescerAssert.ll pass with the verifier.Cameron Zwarich2011-05-191-1/+2
| | | | llvm-svn: 131627
* Make the logic for determining function alignment more explicit. No ↵Eli Friedman2011-05-061-8/+4
| | | | | | functionality change. llvm-svn: 131012
* ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OSDaniel Dunbar2011-04-201-4/+4
| | | | | | triple component. llvm-svn: 129838
* Target/PPC: Eliminate a use of getDarwinVers().Daniel Dunbar2011-04-191-2/+4
| | | | llvm-svn: 129810
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-2/+2
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Insert code in the right location when lowering PowerPC atomics.Jakob Stoklund Olesen2011-04-041-2/+4
| | | | | | | This causes defs to dominate uses, no instructions after terminators, and other goodness. llvm-svn: 128836
* Use X0 instead of R0 for the zero register on ppc64.Jakob Stoklund Olesen2011-04-041-10/+13
| | | | | | The 32-bit R0 cannot be used where a 64-bit register is expected. llvm-svn: 128828
* Allow targets to specify a the type of the RHS of a shift parameterized on ↵Owen Anderson2011-02-251-1/+0
| | | | | | the type of the LHS. llvm-svn: 126518
* Revert r124611 - "Keep track of incoming argument's location while emitting ↵Devang Patel2011-02-211-12/+12
| | | | | | | | | | | LiveIns." In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body. This requires some coordination with debugger to get this working. - The debugger needs to be aware of prolog_end attribute attached with line table entries. - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+) llvm-svn: 126155
* Swap VT and DebugLoc operands of getExtLoad() for consistency withStuart Hastings2011-02-161-1/+1
| | | | | | other getNode() methods. Radar 9002173. llvm-svn: 125665
* Keep track of incoming argument's location while emitting LiveIns.Devang Patel2011-01-311-12/+12
| | | | llvm-svn: 124611
* Remove unused variables found by gcc-4.6's -Wunused-but-set-variable.Jeffrey Yasskin2011-01-181-1/+0
| | | | llvm-svn: 123707
* Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs ↵Anton Korobeynikov2011-01-101-16/+16
| | | | | | and fixes here and there. llvm-svn: 123170
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-231-1/+0
| | | | | | | new gcc warning that complains on self-assignments and self-initializations. llvm-svn: 122458
* rename MVT::Flag to MVT::Glue. "Flag" is a terrible name forChris Lattner2010-12-211-13/+13
| | | | | | | something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
OpenPOWER on IntegriCloud