summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-130/+130
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-130/+130
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-130/+130
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101342
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-132/+134
| | | | llvm-svn: 101334
* Delete unneeeded arguments.Dan Gohman2010-04-141-1/+1
| | | | llvm-svn: 101276
* Pull utility routines with no SelectionDAG dependence out ofDan Gohman2010-04-141-76/+0
| | | | | | | SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for them to live, but it's better than SelectionDAGBuilder for now. llvm-svn: 101267
* Fix typos in comments.Dan Gohman2010-04-141-1/+1
| | | | llvm-svn: 101266
* Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.Dan Gohman2010-04-081-4/+3
| | | | llvm-svn: 100824
* Use twines to simplify calls to report_fatal_error. For code size and ↵Benjamin Kramer2010-04-081-8/+8
| | | | | | readability. llvm-svn: 100756
* convert a report_fatal_error that I was able to trigger into a nice errorChris Lattner2010-04-081-3/+9
| | | | | | | | | | | | | | so the user at least knows what inline asm is a problem. For example: error: inline asm not supported yet: don't know how to handle tied indirect register inputs pr8788-1.c:14:10: note: generated from here asm ("\n" : "+r" (stack->regs) ^ Instead of: fatal error: error in backend: Don't know how to handle tied indirect register inputs yet! llvm-svn: 100731
* minor tidying.Chris Lattner2010-04-071-4/+3
| | | | llvm-svn: 100725
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-6/+6
| | | | llvm-svn: 100709
* Three changes:Chris Lattner2010-04-071-39/+45
| | | | | | | | | | | | | | | 1. Introduce some enums and accessors in the InlineAsm class that eliminate a ton of magic numbers when handling inline asm SDNode. 2. Add a new MDNodeSDNode selection dag node type that holds a MDNode (shocking!) 3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc metadata, propagating it to the instruction emitter, which drops it. No functionality change. llvm-svn: 100605
* remove the now-redundant MMI pointer in SelectionDAG.Chris Lattner2010-04-051-47/+31
| | | | llvm-svn: 100419
* selection dag doesn't need DwarfWriter, remove some tendrils.Chris Lattner2010-04-051-9/+2
| | | | llvm-svn: 100382
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-041-5/+27
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100304
* stop using DebugLoc::getUnknownLoc()Chris Lattner2010-04-021-1/+1
| | | | llvm-svn: 100215
* Switch the code generator (except the JIT) onto the new DebugLocChris Lattner2010-04-021-4/+5
| | | | | | | | | | | | | | | representation. This eliminates the 'DILocation' MDNodes for file/line/col tuples from -O0 -g codegen. This remove the old DebugLoc class, making it a typedef for DebugLoc, I'll rename NewDebugLoc next. I didn't update the JIT to use the new apis, so it will continue to work, but be as slow as before. Someone should eventually do this or, better yet, rip out the JIT debug info stuff and build the JIT on top of MC. llvm-svn: 100209
* Revert r100191 since it breaks objc in clang Mon P Wang2010-04-021-27/+5
| | | | llvm-svn: 100199
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-021-5/+27
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100191
* add new apis for getting/setting !dbg metadata on Chris Lattner2010-03-311-2/+2
| | | | | | | | | instructions. In addition to being a convenience, they are faster than the old apis, particularly when not going from an MDKindID like people should be doing. llvm-svn: 99982
* Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.Bob Wilson2010-03-301-27/+5
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-5/+27
| | | | | | | | | memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) A update of langref will occur in a subsequent checkin. llvm-svn: 99928
* Fix PR4975. Avoid referencing empty vector.Evan Cheng2010-03-291-2/+4
| | | | llvm-svn: 99840
* Pool allocate SDDbgValue nodes.Evan Cheng2010-03-291-11/+8
| | | | llvm-svn: 99836
* Change how dbg_value sdnodes are converted into machine instructions. Their ↵Evan Cheng2010-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers. Here is a theoretical example that illustrates why the placement is important. tmp1 = store tmp1 -> x ... tmp2 = add ... ... call ... store tmp2 -> x Now mem2reg comes along: tmp1 = dbg_value (tmp1 -> x) ... tmp2 = add ... ... call ... dbg_value (tmp2 -> x) When the debugger examine the value of x after the add instruction but before the call, it should have the value of tmp1. Furthermore, for dbg_value's that reference constants, they should not be emitted at the beginning of the block (since they do not have "producers"). This patch also cleans up how SDISel manages DbgValue nodes. It allow a SDNode to be referenced by multiple SDDbgValue nodes. When a SDNode is deleted, it uses the information to find the SDDbgValues and invalidate them. They are not deleted until the corresponding SelectionDAG is destroyed. llvm-svn: 99469
* Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() toBob Wilson2010-03-181-3/+2
| | | | | | | | | | | | | | | | | always create a new jump table. The intention was to avoid merging jump tables in SelectionDAGBuilder, and to wait for the branch folding pass to merge tables. Unfortunately, the same getJumpTableIndex() method is also used to merge tables in branch folding, so as a result of this change branch tables are never merged. Worse, the branch folding code is expecting getJumpTableIndex to always return the index of an existing table, but with this change, it never does so. In at least some cases, e.g., pr6543, this creates references to non-existent tables. I've fixed the problem by adding a new createJumpTableIndex function, which will always create a new table, and I've changed getJumpTableIndex to only look at existing tables. llvm-svn: 98845
* Fix comment.Devang Patel2010-03-181-1/+1
| | | | llvm-svn: 98830
* Debug info intrinsic does not intefer during tail call optimization.Devang Patel2010-03-171-0/+3
| | | | llvm-svn: 98778
* reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner2010-03-161-0/+5
| | | | | | handling constant unions. llvm-svn: 98680
* Revert r98656, its breaking all over the place.Daniel Dunbar2010-03-161-5/+0
| | | | llvm-svn: 98662
* improve support for uniontype and ConstantUnion, patch by Tim Northover!Chris Lattner2010-03-161-0/+5
| | | | llvm-svn: 98656
* Create SDDbgValue for dbg_value intrinsics and remember its connections with ↵Devang Patel2010-03-151-5/+28
| | | | | | | | DAG nodes. This is a work in progress. Patch by Dale Johannesen! llvm-svn: 98568
* Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodesDuncan Sands2010-03-141-1/+1
| | | | | | | with ppc_f128 type by having the type legalizer turn these back into a call to copysignl. llvm-svn: 98514
* Add DAG nodes to represent FP16 <-> FP32 intrinsicsAnton Korobeynikov2010-03-141-0/+8
| | | | llvm-svn: 98500
* get MMI out of the label uniquing business, just go to MCContextChris Lattner2010-03-141-2/+2
| | | | | | to get unique assembler temporary labels. llvm-svn: 98489
* change the LabelSDNode to be EHLabelSDNode and make it holdChris Lattner2010-03-141-8/+4
| | | | | | | | an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". llvm-svn: 98463
* change EH related stuff (other than EH_LABEL) to use MCSymbolChris Lattner2010-03-141-5/+7
| | | | | | | | | | | | | | | | instead of label ID's. This cleans up and regularizes a bunch of code and makes way for future progress. Unfortunately, this pointed out to me that JITDwarfEmitter.cpp is largely copy and paste from DwarfException/MachineModuleInfo and other places. This is very sad and disturbing. :( One major change here is that TidyLandingPads moved from being called in DwarfException::BeginFunction to being called in DwarfException::EndFunction. There should not be any functionality change from doing this, but I'm not an EH expert. llvm-svn: 98459
* Revert turning copysignl into a COPYSIGN node for the moment:Duncan Sands2010-03-121-1/+1
| | | | | | | ppc calls copysignl with a 128 bit ppc long double, resulting in a node that the type legalizer doesn't know how to expand. llvm-svn: 98357
* Now that it's supported, turn copysignl into a COPYSIGN node.Duncan Sands2010-03-121-1/+1
| | | | llvm-svn: 98348
* fix PR6577, a bug in sdbuilder lowering select instructionsChris Lattner2010-03-121-1/+2
| | | | | | whose true value was not Val#0. llvm-svn: 98336
* In case of tail call size of Ins and InVals may not match.Evan Cheng2010-03-111-6/+7
| | | | llvm-svn: 98277
* Remove dead parameter passing.Bill Wendling2010-03-021-50/+45
| | | | llvm-svn: 97536
* simplify this code, return only ever has zero or one operands.Chris Lattner2010-02-281-8/+6
| | | | llvm-svn: 97408
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-8/+8
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Add non-temporal flags and remove an assumption of default arguments.David Greene2010-02-151-8/+16
| | | | llvm-svn: 96240
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-5/+5
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Use array_pod_sort instead of std::sort for improved code size.Jakob Stoklund Olesen2010-02-111-2/+2
| | | | | | | Use SmallVector instead of std::vector for better speed when indirectbr has few successors. llvm-svn: 95879
* Remove duplicate successors from indirectbr instructions before building the ↵Jakob Stoklund Olesen2010-02-111-2/+8
| | | | | | | | | machine CFG. This makes early tail duplication run 60 times faster when compiling the Firefox JavaScript interpreter, see PR6186. llvm-svn: 95831
OpenPOWER on IntegriCloud