summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix "the the" and similar typos.Dan Gohman2010-02-101-2/+2
| | | | llvm-svn: 95781
* Emit an error for illegal inline asm constraint (which uses illegal type) ↵Evan Cheng2010-02-101-1/+13
| | | | | | rather than asserting. llvm-svn: 95746
* Apply the 95471 fix to SelectionDAGBuilder as well;Dale Johannesen2010-02-081-0/+2
| | | | | | | we can get in here if FastISel gives up in a block. (Actually the two copies of this need to be unified. Later.) llvm-svn: 95579
* In guaranteed tailcall mode, don't decline the tailcall optimizationDan Gohman2010-02-081-7/+10
| | | | | | for blocks ending in "unreachable". llvm-svn: 95565
* Fix typo Duncan noticed.Evan Cheng2010-02-041-1/+1
| | | | llvm-svn: 95322
* It's too risky to eliminate sext / zext of call results for tail call ↵Evan Cheng2010-02-041-6/+4
| | | | | | optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing). llvm-svn: 95282
* Revert 94937 and move the noreturn check to codegen.Evan Cheng2010-02-031-2/+7
| | | | llvm-svn: 95198
* Allow all types of callee's to be tail called. But avoid automatic tailcall ↵Evan Cheng2010-02-031-4/+9
| | | | | | if the callee is a result of bitcast to avoid losing necessary zext / sext etc. llvm-svn: 95195
* Revert 95130.Evan Cheng2010-02-021-1/+1
| | | | llvm-svn: 95160
* Pass callsite return type to TargetLowering::LowerCall and use that to check ↵Evan Cheng2010-02-021-1/+1
| | | | | | sibcall eligibility. llvm-svn: 95130
* eliminate a bunch of pointless LLVMContext arguments.Chris Lattner2010-02-011-2/+1
| | | | llvm-svn: 95001
* fix PR 6157. Testcase pending.Dale Johannesen2010-02-011-0/+35
| | | | llvm-svn: 94996
* Assign the ordering of SDNodes in a much less intrusive fashion. After theBill Wendling2010-01-281-690/+165
| | | | | | | "visit*" method is called, take the newly created nodes, walk them in a DFS fashion, and if they don't have an ordering set, then give it one. llvm-svn: 94757
* Update of 94055 to track the IR level call site information via an intrinsic.Jim Grosbach2010-01-281-0/+19
| | | | | | | This allows code gen and the exception table writer to cooperate to make sure landing pads are associated with the correct invoke locations. llvm-svn: 94726
* Eliminate target hook IsEligibleForTailCallOptimization.Evan Cheng2010-01-271-9/+0
| | | | | | | | | Target independent isel should always pass along the "tail call" property. Change target hook LowerCall's parameter "isTailCall" into a refernce. If the target decides it's impossible to honor the tail call request, it should set isTailCall to false to make target independent isel happy. llvm-svn: 94626
* Allow some automatic tailcall optimization without changing ABI.Evan Cheng2010-01-261-6/+1
| | | | llvm-svn: 94611
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-251-3/+5
| | | | | | | | | | | | | | | | | | 1. MachineJumpTableInfo is now created lazily for a function the first time it actually makes a jump table instead of for every function. 2. The encoding of jump table entries is now described by the MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the TLI::getJumpTableEncoding() hook, instead of by lots of code scattered throughout the compiler that "knows" that jump table entries are always 32-bits in pic mode (for example). 3. The size and alignment of jump table entries is now calculated based on their kind, instead of at machinefunction creation time. Future work includes using the EntryKind in more places in the compiler, eliminating other logic that "knows" the layout of jump tables in various situations. llvm-svn: 94470
* Remove the '-disable-scheduling' flag and replace it with the 'source' option ofBill Wendling2010-01-231-667/+382
| | | | | | | | | the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also, keep track of the SDNode ordering by default. Eventually, we would like to make this ordering a way to break a "tie" in the scheduler. However, doing that now breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux. llvm-svn: 94308
* back this out for now. Growing Function is not good.Jim Grosbach2010-01-211-6/+0
| | | | llvm-svn: 94097
* Make sure that landing pad entries in the EH call site table are in the properJim Grosbach2010-01-211-0/+6
| | | | | | order for SjLj style exception handling. llvm-svn: 94055
* When checking for sret-demotion, it needs to use legal types. When using ↵Kenneth Uildriks2010-01-161-11/+41
| | | | | | the return value of an sret-demoted call, it needs to use possibly illegal types that match the declared Type of the callee. llvm-svn: 93667
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-5/+4
| | | | | | dereference the type pointer. llvm-svn: 92726
* Delete renaming use of dead dbg intrinsics.Devang Patel2010-01-051-6/+0
| | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start llvm-svn: 92672
* Change errs() to dbgs().David Greene2010-01-051-10/+10
| | | | llvm-svn: 92577
* Use a pointer type rather than MVT::Other for the ExternalSymbol node usedDan Gohman2010-01-041-1/+2
| | | | | | in an inline asm. llvm-svn: 92512
* Teach codegen to handle:Chris Lattner2010-01-021-0/+12
| | | | | | | | | | | (X != null) | (Y != null) --> (X|Y) != 0 (X == null) & (Y == null) --> (X|Y) == 0 so that instcombine can stop doing this for pointers. This is part of PR3351, which is a case where instcombine doing this for pointers (inserting ptrtoint) is pessimizing code. llvm-svn: 92406
* Fix a warning on gcc 4.4.Mikhail Glushenkov2010-01-011-1/+2
| | | | | | | SelectionDAGBuilder.cpp:4294: warning: suggest explicit braces to avoid ambiguous ‘else’ llvm-svn: 92395
* Trailing whitespace, 80-col violations.Mikhail Glushenkov2010-01-011-77/+82
| | | | llvm-svn: 92394
* Teach codegen to lower llvm.powi to an efficient (but not optimal) Chris Lattner2010-01-011-5/+57
| | | | | | | | | | multiply sequence when the power is a constant integer. Before, our codegen for std::pow(.., int) always turned into a libcall, which was really inefficient. This should also make many gfortran programs happier I'd imagine. llvm-svn: 92388
* remove a bunch of unneeded functions.Chris Lattner2009-12-291-1/+1
| | | | llvm-svn: 92263
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-8/+2
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-3/+3
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* handle equality memcmp of 8 bytes on x86-64 with two unaligned loads and a Chris Lattner2009-12-241-19/+55
| | | | | | | | compare. On other targets we end up with a call to memcmp because we don't want 16 individual byte loads. We should be able to use movups as well, but we're failing to select the generated icmp. llvm-svn: 92107
* move an optimization for memcmp out of simplifylibcalls and into Chris Lattner2009-12-241-0/+103
| | | | | | | | | SDISel. This optimization was causing simplifylibcalls to introduce type-unsafe nastiness. This is the first step, I'll be expanding the memcmp optimizations shortly, covering things that we really really wouldn't want simplifylibcalls to do. llvm-svn: 92098
* Use more sensible type for flags in asms. PR 5570.Dale Johannesen2009-12-231-3/+1
| | | | | | Patch by Sylve`re Teissier (sorry, ASCII only). llvm-svn: 91988
* Update objectsize intrinsic and associated dependencies. FixEric Christopher2009-12-231-1/+1
| | | | | | lowering code and update testcases. llvm-svn: 91979
* Remove superfluous SDNode ordering.Bill Wendling2009-12-231-48/+16
| | | | llvm-svn: 91971
* Remove node ordering from inline asm nodes. It's not needed.Bill Wendling2009-12-231-16/+0
| | | | llvm-svn: 91961
* Remove node ordering from VA nodes. It's not needed.Bill Wendling2009-12-231-25/+14
| | | | llvm-svn: 91958
* Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAPBill Wendling2009-12-221-0/+1
| | | | | | was using "Tmp1" in the first getNode call instead of Node->getOperand(0). llvm-svn: 91936
* Allow 0 as an order number. Don't assign an order to formal arguments.Bill Wendling2009-12-221-17/+10
| | | | llvm-svn: 91920
* Report an error for bad inline assembly, where the value passed for anBob Wilson2009-12-221-2/+6
| | | | | | "indirect" operand is not a pointer. llvm-svn: 91913
* Add more plumbing. This time in the LowerArguments and "get" functions whichBill Wendling2009-12-221-43/+138
| | | | | | | | return partial registers. This affected the back-end lowering code some. Also patch up some places I missed before in the "get" functions. llvm-svn: 91880
* Add SDNode ordering to inlined asm and VA functions.Bill Wendling2009-12-221-28/+78
| | | | llvm-svn: 91876
* Adding more assignment of ordering to SDNodes. This time in the "call" andBill Wendling2009-12-221-32/+66
| | | | | | generic copy functions. llvm-svn: 91872
OpenPOWER on IntegriCloud