aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the getAddress getter, initialize Ordinal in the constructor and useRafael Espindola2010-12-061-2/+0
| | | | | | that on the ELF writer to detect a section we created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120981 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a getSymbolOffset method and use it in the ELF writer.Rafael Espindola2010-12-061-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120977 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8728, a miscompilation I recently introduced. When optimizingChris Lattner2010-12-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | memcpy's like: memcpy(A, B) memcpy(A, C) we cannot delete the first memcpy as dead if A and C might be aliases. If so, we actually get: memcpy(A, B) memcpy(A, A) which is not correct to transform into: memcpy(A, A) This patch was heavily influenced by Jakub Staszak's patch in PR8728, thanks Jakub! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120974 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper method.Chris Lattner2010-12-061-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120973 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember the contents of leb and dwarfline fragments when relaxing. This avoidsRafael Espindola2010-12-042-16/+8
| | | | | | having to evaluate the expression again when writing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120920 91177308-0d34-0410-b5e6-96231b3b80d8
* APInt: microoptimize a few methods.Benjamin Kramer2010-12-041-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120912 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify APInt::getAllOnesValue.Benjamin Kramer2010-12-041-8/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120911 91177308-0d34-0410-b5e6-96231b3b80d8
* There are two reasons why we might want to useRafael Espindola2010-12-043-3/+10
| | | | | | | | | | | | | | | | foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120889 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add status implementation.Michael J. Spencer2010-12-041-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120870 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/SystemError: Make error_category and error_code ↵Michael J. Spencer2010-12-041-4/+12
| | | | | | auto-bool-conversion-safe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120869 91177308-0d34-0410-b5e6-96231b3b80d8
* Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoidRafael Espindola2010-12-042-2/+9
| | | | | | | | | | | doing that if the target is darwin10 or newer. This fixes *) Direct object emission was producing objects without the workaround on darwin9. *) Assembly printing was producing objects with the workaround on linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120866 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IntervalMap::iterator::set{Start,Stop,Value} methods that allow limitedJakob Stoklund Olesen2010-12-031-21/+172
| | | | | | | | | | | editing of the current interval. These methods may cause coalescing, there are corresponding set*Unchecked methods for editing without coalescing. The non-coalescing methods are useful for applying monotonic transforms to all keys or values in a map without accidentally coalescing transformed and untransformed intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120829 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Fix MinGW build. It doesn't have _chsize_s.Michael J. Spencer2010-12-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120826 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix paste-o in ExtractValueInst::getIndexedType() comments.Frits van Bommel2010-12-031-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120804 91177308-0d34-0410-b5e6-96231b3b80d8
* Apparently OS X 10.4 doesn't have __crashreporter_info__.Eric Christopher2010-12-031-0/+3
| | | | | | | Try to fix building on the wayback machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120801 91177308-0d34-0410-b5e6-96231b3b80d8
* Make EmitIntValue more efficient and more like what we do for leb128. TheRafael Espindola2010-12-031-1/+2
| | | | | | difference is much smaller (about 0.3s) but significant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120787 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add unique_file and exists implementations.Michael J. Spencer2010-12-031-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120776 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Remove temp_directory_path.Michael J. Spencer2010-12-031-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120775 91177308-0d34-0410-b5e6-96231b3b80d8
* clarify commentChris Lattner2010-12-031-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120772 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to resolve symbol differences early, and if successful create a plainRafael Espindola2010-12-034-3/+18
| | | | | | | data fragment. This reduces the time to assemble the test in 8711 from 60s to 54s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120767 91177308-0d34-0410-b5e6-96231b3b80d8
* It may not be an option to skip .debug_line if there are file reference in ↵Devang Patel2010-12-032-4/+2
| | | | | | already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120760 91177308-0d34-0410-b5e6-96231b3b80d8
* Use set directive for StartMinusEndExpr.Devang Patel2010-12-022-2/+3
| | | | | | | This is a fix for llvm-gcc-i386-darwin9 buildbot failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120742 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EmitValueToOffset to the ObjectStreamer.Rafael Espindola2010-12-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120691 91177308-0d34-0410-b5e6-96231b3b80d8
* Add EmitInstToFragment to the generic object streamer.Rafael Espindola2010-12-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120690 91177308-0d34-0410-b5e6-96231b3b80d8
* The sections that the ELF object writer has to create are very simple andRafael Espindola2010-12-021-3/+2
| | | | | | | | contain only data. Handle them specially instead of using AddSectionToTheEnd. This moves a hack from the generic assembler to the elf writer. It is also a bit faster and should make other improvements easier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120683 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2010-12-021-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120644 91177308-0d34-0410-b5e6-96231b3b80d8
* If tehre are not any line entry then do not try to emit .debug_line section.Devang Patel2010-12-021-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120637 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the first half of LiveDebugVariables.Jakob Stoklund Olesen2010-12-021-0/+14
| | | | | | | | | | | | | | | | | | | Scan the MachineFunction for DBG_VALUE instructions, and replace them with a data structure similar to LiveIntervals. The live range of a DBG_VALUE is determined by propagating it down the dominator tree until a new DBG_VALUE is found. When a DBG_VALUE lives in a register, its live range is confined to the live range of the register's value. LiveDebugVariables runs before coalescing, so DBG_VALUEs are not artificially extended when registers are joined. The missing half will recreate DBG_VALUE instructions from the intervals when register allocation is complete. The pass is disabled by default. It can be enabled with the temporary command line option -live-debug-variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120636 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused argument.Rafael Espindola2010-12-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120621 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename temporary symbols if they conflict with artificial symbols createdRafael Espindola2010-12-011-0/+7
| | | | | | | | | by the assembler. This was blocking parsing any large .s produced by clang for example. Fixes PR8596. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120603 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/ADT/Twine: Add toNullTerminatedStringRef.Michael J. Spencer2010-12-011-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120600 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Split PathV2.h into PathV2.h and FileSystem.h.Michael J. Spencer2010-12-012-593/+628
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120592 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Rename overloaded APInt methods set(), clear(), flip() toJay Foad2010-12-011-12/+12
| | | | | | setAllBits(), setBit(unsigned), etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120564 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Remove is_valid. It was only added because Path had it, butMichael J. Spencer2010-12-011-8/+0
| | | | | | apparently it is unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120540 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete Path::appendSuffix's return value; it wasn't used anywhere, whichDan Gohman2010-12-011-7/+2
| | | | | | | is fine since isn't really necessary to check isValid there anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120538 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add remove_filename implementation.Michael J. Spencer2010-12-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120513 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable sibling call optimization of libcalls which are expanded duringEvan Cheng2010-11-302-1/+13
| | | | | | | | | | | | legalization time. Since at legalization time there is no mapping from SDNode back to the corresponding LLVM instruction and the return SDNode is target specific, this requires a target hook to check for eligibility. Only x86 and ARM support this form of sibcall optimization right now. rdar://8707777 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120501 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement reverse iteration and parent_path.Michael J. Spencer2010-11-301-2/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120496 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/ADT/StringRef: Add find_last_of.Michael J. Spencer2010-11-301-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120495 91177308-0d34-0410-b5e6-96231b3b80d8
* teach DSE to use GetPointerBaseWithConstantOffset to analyzeChris Lattner2010-11-301-0/+5
| | | | | | | | | may-aliasing stores that partially overlap with different base pointers. This implements PR6043 and the non-variable part of PR8657 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120485 91177308-0d34-0410-b5e6-96231b3b80d8
* move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.hChris Lattner2010-11-301-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120476 91177308-0d34-0410-b5e6-96231b3b80d8
* Performance optimization on ImmutableMap/ImmutableSet:Ted Kremenek2010-11-302-88/+159
| | | | | | | | | | | | | | | | | | | | | | | | - Use a DenseSet instead of a FoldingSet to cache canonicalized nodes. This reduces the overhead of double-hashing. - Use reference counts in ImutAVLTree to much more aggressively recover tree nodes that are no longer usable. We can generate many transient nodes while using add() and remove() on ImmutableSet/ImmutableMaps to generate a final set/map. For the clang static analyzer (the main client of these data structures), this results in a slight speedup (0.5%) when analyzing sqlite3, but much more importantly results in a 30-60% reduction in peak memory usage when the analyzer is analyzing a given function in a file. On average that's about a ** 44% reduction ** in the memory footprint of the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120459 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the basic block map in LoopInfo from a std::map to a DenseMap. This ↵Cameron Zwarich2010-11-301-4/+5
| | | | | | | | | is a 16% speedup running loops on test-suite + SPEC2000. Reviewed by Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120440 91177308-0d34-0410-b5e6-96231b3b80d8
* add TLI support indicating that jumps are more expensive than logical operationsChris Lattner2010-11-301-1/+19
| | | | | | | and use this to disable a specific optimization. Patch by Micah Villmow! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120435 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.Jay Foad2010-11-301-23/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120413 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the main DSE loop to be written in terms of reasoningChris Lattner2010-11-301-0/+3
| | | | | | | | | | | | | | | | about pairs of AA::Location's instead of looking for MemDep's "Def" predicate. This is more powerful and general, handling memset/memcpy/store all uniformly, and implementing PR8701 and probably obsoleting parts of memcpyoptimizer. This also fixes an obscure bug with init.trampoline and i8 stores, but I'm not surprised it hasn't been hit yet. Enhancing init.trampoline to carry the size that it stores would allow DSE to be much more aggressive about optimizing them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120406 91177308-0d34-0410-b5e6-96231b3b80d8
* death to extraneous \n's.Chris Lattner2010-11-301-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120405 91177308-0d34-0410-b5e6-96231b3b80d8
* Make @llvm.invariant.start not be readonly, so that it has side-effects. ThisNick Lewycky2010-11-301-1/+1
| | | | | | | | unbreaks test/Transforms/InstCombine/invariant.ll which was broken by r120382. This is a fix-forward to do what I think Chris intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120388 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub out a new LiveDebugVariables pass.Jakob Stoklund Olesen2010-11-301-0/+1
| | | | | | | | | | | | | This analysis is going to run immediately after LiveIntervals. It will stay alive during register allocation and keep track of user variables mentioned in DBG_VALUE instructions. When the register allocator is moving values between registers and the stack, it is very hard to keep track of DBG_VALUE instructions. We usually get it wrong. This analysis maintains a data structure that makes it easy to update DBG_VALUE instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120385 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the pointless check of MemoryUseIntrinsic fromChris Lattner2010-11-301-24/+1
| | | | | | | | is trivially dead, since these have side effects. This makes the (misnamed) MemoryUseIntrinsic class dead, so remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120382 91177308-0d34-0410-b5e6-96231b3b80d8