summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add an experimental early if-conversion pass, off by default.Jakob Stoklund Olesen2012-07-044-0/+594
| | | | | | | | | | | | | This pass performs if-conversion on SSA form machine code by speculatively executing both sides of the branch and using a cmov instruction to select the result. This can help lower the number of branch mispredictions on architectures like x86 that don't have predicable instructions. The current implementation is very aggressive, and causes regressions on mosts tests. It needs good heuristics that have yet to be implemented. llvm-svn: 159694
* PHINode::hasConstantValue(): return undef if the PHI is fully recursive.Nuno Lopes2012-07-032-1/+3
| | | | | | Thanks Duncan for the idea llvm-svn: 159687
* Use the DebugInfo's 'print()' method to emit the comments.Bill Wendling2012-07-031-3/+5
| | | | | | | These give quite a bit more information about the DebugInfo and makes it more readable. llvm-svn: 159680
* BoundsChecking: optimize out the check for offset < 0 if size is known to ↵Nuno Lopes2012-07-031-7/+10
| | | | | | | | be >= 0 (signed). (LLVM optimizers cannot do this optimization by themselves) llvm-svn: 159668
* fold PHI nodes in SizeOffsetEvaluator whenever possible.Nuno Lopes2012-07-031-1/+13
| | | | | | Unfortunately this change requires the cache map to hold WeakVHs instead llvm-svn: 159667
* improve PHINode::hasConstantValue() to detect recursive cases like %phi = ↵Nuno Lopes2012-07-031-2/+6
| | | | | | phi(%phi,42) as constant llvm-svn: 159666
* Part of r159527. Splitted into series of patches and gone with fixed PR13256:Stepan Dyatkovskiy2012-07-032-11/+13
| | | | | | | | IntegersSubsetMapping - Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement if possible. llvm-svn: 159659
* Remove extra space.Craig Topper2012-07-031-12/+12
| | | | llvm-svn: 159647
* Change i128mem/i256mem to f128mem/f256mem on some floating point vector ↵Craig Topper2012-07-031-14/+14
| | | | | | instructions. llvm-svn: 159646
* MCContext.cpp: Fixup for my odd previous commit. No functional changes.NAKAMURA Takumi2012-07-031-1/+1
| | | | llvm-svn: 159645
* Add aliases for pblendvb, blendvpd, and blendvps instructions with the ↵Craig Topper2012-07-031-5/+19
| | | | | | implicit xmm0 operand specified. Fixes PR13252. llvm-svn: 159644
* MCContext::GetDwarfFile(): Make FileName parsing tolerant of DOSish pathsep ↵NAKAMURA Takumi2012-07-031-5/+5
| | | | | | | | with PathV2. It fixes failure in test/MC/MachO/gen-dwarf.s on Win32 w/o bash. llvm-svn: 159640
* mips32 long long register inline asm constraint support.Jack Carter2012-07-021-0/+2
| | | | | | | inlineasm-cnstrnt-bad-r-1.ll is NOT supposed to fail, so it was removed. This resulted in the removal of a negative test (inlineasm-cnstrnt-bad-r-1.ll) llvm-svn: 159625
* Revert " mips32 long long register inline asm constraint support." asEric Christopher2012-07-021-2/+0
| | | | | | | | it appears to be breaking the bots. This reverts commit 1b055ce320fa13f6f1ac81670d11b45e01f79876. llvm-svn: 159619
* Revert "IntRange:" as it appears to be breaking self hosting.Eric Christopher2012-07-023-98/+159
| | | | | | This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. llvm-svn: 159618
* All glory to address sanitizer. ;]Chandler Carruth2012-07-021-2/+8
| | | | | | | | | | | | It appears to have caught a use-after-free introduced as by r159567 and/or friends which call 'addPass' from many more places. The bug in 'addPass' doesn't appear to be new, and was spotted by inspection when ASan shown a bright light of a stacktrace at these functions. Hopefully this will fix the ASan failure -- I have no test case other than running an ASan-built clang over the test suite. llvm-svn: 159614
* Target option DisableJumpTables is a gross hack. Move it to TargetLowering ↵Evan Cheng2012-07-024-17/+19
| | | | | | instead. llvm-svn: 159611
* mips32 long long register inline asm constraint support.Jack Carter2012-07-021-0/+2
| | | | | | | inlineasm-cnstrnt-bad-r-1.ll is NOT supposed to fail, so it was removed. This resulted in the removal of a negative test (inlineasm-cnstrnt-bad-r-1.ll) llvm-svn: 159610
* misched: allow NULL InstrItineraries.Andrew Trick2012-07-021-0/+1
| | | | llvm-svn: 159599
* Turn an assert into an error to make it a bit more friendly.Eric Christopher2012-07-021-2/+9
| | | | | | Part of rdar://6880388 and rdar://11766377 llvm-svn: 159590
* Pass the correct ELFOSABI enumeration to the MipsELFObjectWriter constructorJack Carter2012-07-021-1/+2
| | | | | Contributer: Sasa Stankovic llvm-svn: 159574
* Extend TargetPassConfig to allow running only a subset of the normal passes.Bob Wilson2012-07-025-16/+43
| | | | | | | | | | | | | | | | | This is still a work in progress but I believe it is currently good enough to fix PR13122 "Need unit test driver for codegen IR passes". For example, you can run llc with -stop-after=loop-reduce to have it dump out the IR after running LSR. Serializing machine-level IR is not yet supported but we have some patches in progress for that. The plan is to serialize the IR to a YAML file, containing separate sections for the LLVM IR, machine-level IR, and whatever other info is needed. Chad suggested that we stash the stop-after pass in the YAML file and use that instead of the start-after option to figure out where to restart the compilation. I think that's a great idea, but since it's not implemented yet I put the -start-after option into this patch for testing purposes. llvm-svn: 159570
* Move assertion with TargetPassConfig's Initialized flag.Bob Wilson2012-07-021-2/+2
| | | | llvm-svn: 159569
* Consistently use AnalysisID types in TargetPassConfig.Bob Wilson2012-07-023-64/+62
| | | | | | | This makes it possible to just use a zero value to represent "no pass", so the phony NoPassID global variable is no longer needed. llvm-svn: 159568
* Add all codegen passes to the PassManager via TargetPassConfig.Bob Wilson2012-07-0213-98/+103
| | | | | | | | This is a preliminary step toward having TargetPassConfig be able to start and stop the compilation at specified passes for unit testing and debugging. No functionality change. llvm-svn: 159567
* Revert accidental checkin.Andrew Trick2012-07-021-3/+2
| | | | | | My last checkin was apparently not the branch I intended. It was missing one change (added by chandlerc), and contained a spurious change. llvm-svn: 159548
* GlobalOpt forgot to handle bitcast when analyzing globals. Found by inspection.Duncan Sands2012-07-021-0/+2
| | | | llvm-svn: 159546
* Added assertion in getVRegDef of MachineRegisterInfo to make sure the virtualManman Ren2012-07-022-5/+8
| | | | | | | register does not have multiple definitions. Modified TwoAddressInstructionPass to use getUniqueVRegDef instead of getVRegDef. llvm-svn: 159545
* Reapply "Make NumMicroOps a variable in the subtarget's instruction itinerary."Andrew Trick2012-07-025-50/+66
| | | | | | Reapplies r159406 with minor cleanup. The regressions appear to have been spurious. llvm-svn: 159541
* Do not attempt to use ROR for Thumb1.Bob Wilson2012-07-021-2/+2
| | | | | | Patch by Matt Fischer! llvm-svn: 159538
* fix the regression I introduced in r159385 (it's necessary to update PHI ↵Nuno Lopes2012-07-021-0/+3
| | | | | | nodes in unwind BB llvm-svn: 159534
* IntRange:Stepan Dyatkovskiy2012-07-023-159/+98
| | | | | | | | | | | | | | | | | | | | | | - Changed isSingleNumber method behaviour. Now this flag is calculated on demand. IntegersSubsetMapping - Optimized diff operation. - Replaced type of Items field from std::list with std::map. - Added new methods: bool isOverlapped(self &RHS) void add(self& RHS, SuccessorClass *S) void detachCase(self& NewMapping, SuccessorClass *Succ) void removeCase(SuccessorClass *Succ) SuccessorClass *findSuccessor(const IntTy& Val) const IntTy* getCaseSingleNumber(SuccessorClass *Succ) IntegersSubsetTest - DiffTest: Added checks for successors. SimplifyCFG Updated SwitchInst usage (now it is case-ragnes compatible) for - SimplifyEqualityComparisonWithOnlyPredecessor - FoldValueComparisonIntoPredecessors llvm-svn: 159527
* [asan] small code simplificationKostya Serebryany2012-07-021-18/+14
| | | | llvm-svn: 159522
* This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF ↵Alexey Samsonov2012-07-027-25/+108
| | | | | | | | | | parser: 1) DIContext is now able to return function name for a given instruction address (besides file/line info). 2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag). 3) test case that checks the basic functionality of llvm-dwarfdump added llvm-svn: 159512
* Now that RegistersDefinedFromSameValue handles one instruction being anRafael Espindola2012-07-011-14/+4
| | | | | | | | | implicit_def, the other instruction can be anything, including instructions that define multiple values. Be careful about that and don't assume what operand 0 is. Fixes pr13249. llvm-svn: 159509
* Optimization of shuffle node that can fit to the register form of VBROADCAST ↵Elena Demikhovsky2012-07-012-6/+39
| | | | | | instruction on AVX2. llvm-svn: 159504
* Reduce code size by using a second switch statement to avoid extra calls to ↵Craig Topper2012-07-011-9/+19
| | | | | | SelectAtomic64. Also catch cases where SelectAtomic64 fails. llvm-svn: 159503
* Add a break to the end of case statement missed in r159501.Craig Topper2012-07-011-0/+1
| | | | llvm-svn: 159502
* Fix a crash on release builds if gather intrinsics are passed a non-constant ↵Craig Topper2012-07-011-2/+5
| | | | | | value for the last argument. llvm-svn: 159501
* Use a second switch statement to reduce number of calls to SelectGather in ↵Craig Topper2012-07-011-17/+23
| | | | | | code. Reduces code size a bit. llvm-svn: 159500
* Reduce use list thrashing by using DenseMap's find_as for maps with ↵Benjamin Kramer2012-06-302-9/+11
| | | | | | | | ValueHandle keys. No functionality change. llvm-svn: 159497
* Don't reinsert the 'atexit' function if it already exists.Bill Wendling2012-06-301-2/+1
| | | | llvm-svn: 159491
* Handle implicit_defs in the register coalescer. I am still trying to produceRafael Espindola2012-06-301-27/+40
| | | | | | a reduced testcase, but this fixes pr13209. llvm-svn: 159479
* revert r159440. As Duncan pointed out, the test for invoke is not needed at ↵Nuno Lopes2012-06-291-2/+1
| | | | | | this point llvm-svn: 159471
* ARM: Clean up optimizeCompare in peephole, no functional change.Manman Ren2012-06-291-80/+73
| | | | | | | | Use getUniqueVRegDef. Replace a loop with existing interfaces: modifiesRegister and readsRegister. Factor out code into inline functions and simplify the code. llvm-svn: 159470
* Add SrcReg2 to analyzeCompare and optimizeCompareInstr to handle CompareManman Ren2012-06-293-28/+40
| | | | | | instructions with two register operands. llvm-svn: 159465
* Clear kill flags in InstrEmitter::EmitSubregNode().Jakob Stoklund Olesen2012-06-291-0/+1
| | | | | | | When a local virtual register is made global, make sure to clear any existing kill flags. llvm-svn: 159461
* Check for extra kill flags on live-out virtual registers.Jakob Stoklund Olesen2012-06-291-0/+14
| | | | | | | This would previously get reported as the misleading "Virtual register def doesn't dominate all uses." llvm-svn: 159460
* CodeGenPrepare: Don't crash when TLI is not available.Benjamin Kramer2012-06-291-1/+2
| | | | | | This happens when codegenprepare is invoked via opt. llvm-svn: 159457
* Add getUniqueVRegDef to MachineRegisterInfo.Manman Ren2012-06-291-0/+11
| | | | | | This comes in handy during peephole optimization. llvm-svn: 159453
OpenPOWER on IntegriCloud