summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* add a helper method.Chris Lattner2011-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125453 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds llvm::sys::path::is_separator() to test whether a char is a path separatorZhanyong Wan2011-02-11
| | | | | | | on the host OS. Reviewed by dgregor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125406 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace.Jim Grosbach2011-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125385 91177308-0d34-0410-b5e6-96231b3b80d8
* Poison the relational operators ==, !=, <, <=, >=, > on llvm::OptionalDouglas Gregor2011-02-11
| | | | | | | | objects, since they'll end up using the implicit conversion to "bool" and causing some very "fun" surprises. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125380 91177308-0d34-0410-b5e6-96231b3b80d8
* make the constantexpr interfaces for inbounds GEPs follow the same styleChris Lattner2011-02-11
| | | | | | | as other constantexpr flags, reducing redundancy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125365 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove std::string version of getNameWithPrefix.Rafael Espindola2011-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125363 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace.Jim Grosbach2011-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125327 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean trailing whitespace.Owen Anderson2011-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125304 91177308-0d34-0410-b5e6-96231b3b80d8
* switch the constantexpr, target folder, and IRBuilder interfacesChris Lattner2011-02-10
| | | | | | | | for NSW/NUW binops to follow the pattern of exact binops. This allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125270 91177308-0d34-0410-b5e6-96231b3b80d8
* Rip out realpath() support. It's expensive, and often a bad idea, andDouglas Gregor2011-02-09
| | | | | | | I have another way to achieve the same goal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125239 91177308-0d34-0410-b5e6-96231b3b80d8
* Move calcLiveBlockInfo() and the BlockInfo struct into SplitAnalysis.Jakob Stoklund Olesen2011-02-09
| | | | | | No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125231 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::sys::path::canonical(), which provides the canonicalizedDouglas Gregor2011-02-09
| | | | | | | | | | | name of a path, after resolving symbolic links and eliminating excess path elements such as "foo/../" and "./". This routine still needs a Windows implementation, but I don't have a Windows machine available. Help? Please? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125228 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize po_iterator: don't do redundant lookups.Dan Gohman2011-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125211 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach instsimplify some tricks about exact/nuw/nsw shifts.Chris Lattner2011-02-09
| | | | | | | | improve interfaces to instsimplify to take this info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125196 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework InstrTypes.h so to reduce the repetition around the NSW/NUW/ExactChris Lattner2011-02-09
| | | | | | | | | | | | | | | | | | | | versions of creation functions. Eventually, the "insertion point" versions of these should just be removed, we do have IRBuilder afterall. Do a massive rewrite of much of pattern match. It is now shorter and less redundant and has several other widgets I will be using in other patches. Among other changes, m_Div is renamed to m_IDiv (since it only matches integer divides) and m_Shift is gone (it used to match all binops!!) and we now have m_LogicalShift for the one client to use. Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv and reduce redundancy within IRbuilder by having these methods chain to each other more instead of duplicating code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125194 91177308-0d34-0410-b5e6-96231b3b80d8
* enrich folder interfaces around exactness.Chris Lattner2011-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125191 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor ConstantExpr interfaces a bit around "exactness".Chris Lattner2011-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125190 91177308-0d34-0410-b5e6-96231b3b80d8
* Add intrinsic for setc instruction on the XCore.Richard Osborne2011-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125186 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in ↵NAKAMURA Takumi2011-02-09
| | | | | | | | | | | config.h.*. AC_CHECK_FUNCS seeks a symbol only in libs. We should check the declaration in string.h. FIXME: I have never seen mingw(s) have strerror_s() (not _strerror_s()). FIXME: Autoconf/CMake may seek strerror_s() with the definition MINGW_HAS_SECURE_API in future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125172 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't open the file again in the gold plugin. To be able to do this, updateRafael Espindola2011-02-08
| | | | | | MemoryBuffer::getOpenFile to not close the file descriptor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125128 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LiveIntervals::addKillFlags() to recompute kill flags after register ↵Jakob Stoklund Olesen2011-02-08
| | | | | | | | | allocation. This is a lot easier than trying to get kill flags right during live range splitting and rematerialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125113 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LiveIntervals::shrinkToUses().Jakob Stoklund Olesen2011-02-08
| | | | | | | | After uses of a live range are removed, recompute the live range to only cover the remaining uses. This is necessary after rematerializing the value before some (but not all) uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125058 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for custom target specific asm parsing of operands.Bruno Cardoso Lopes2011-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: Improve the parsing of not usual (different from registers or immediates) operand forms. This commit implements only the generic support. The ARM specific modifications will come next. A table like the one below is autogenerated for every instruction containing a 'ParserMethod' in its AsmOperandClass static const OperandMatchEntry OperandMatchTable[20] = { /* Mnemonic, Operand List Mask, Operand Class, Features */ { "cdp", 29 /* 0, 2, 3, 4 */, MCK_Coproc, Feature_IsThumb|Feature_HasV6 }, { "cdp", 58 /* 1, 3, 4, 5 */, MCK_Coproc, Feature_IsARM }, A matcher function very similar (but lot more naive) to MatchInstructionImpl scans the table. After the mnemonic match, the features are checked and if the "to be parsed" operand index is present in the mask, there's a real match. Then, a switch like the one below dispatch the parsing to the custom method provided in 'ParseMethod': case MCK_Coproc: return TryParseCoprocessorOperandName(Operands); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125030 91177308-0d34-0410-b5e6-96231b3b80d8
* implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-07
| | | | | | | Factor some code better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125006 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an m_Div pattern for matching either a udiv or an sdiv and use itDuncan Sands2011-02-07
| | | | | | | to simplify the "(X/Y)*Y->X when the division is exact" transform. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125004 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IRBuilder methods for creating an exact udiv, like for exact sdiv.Duncan Sands2011-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125002 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-06
| | | | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.NAKAMURA Takumi2011-02-05
| | | | | | | config.h.* have conditions whether each symbol is defined or not. Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124950 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite how the indirect call bonus is handled. This now works by:Eric Christopher2011-02-05
| | | | | | | | | | | | | | | | | | a) Making it a per call site bonus for functions that we can move from indirect to direct calls. b) Reduces the bonus from 500 to 100 per call site. c) Subtracts the size of the possible newly inlineable call from the bonus to only add a bonus if we can inline a small function to devirtualize it. Also changes the bonus from a positive that's subtracted to a negative that's added. Fixes the remainder of rdar://8546196 by reducing the object file size after inlining by 84%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124916 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge .debug_loc entries whenever possible to reduce debug_loc size.Devang Patel2011-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124904 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ARM/MC/ELF about EF_ARM_EABI_VERSION. The magic number is set toJason W Kim2011-02-04
| | | | | | | | | | | 5 to match the current doc. Added FIXME reminder Make it really configurable later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124899 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LiveIntervals::getLastSplitPoint().Jakob Stoklund Olesen2011-02-04
| | | | | | | | A live range cannot be split everywhere in a basic block. A split must go before the first terminator, and if the variable is live into a landing pad, the split must happen before the call that can throw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124894 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmMatcher: Add support for custom conversion functions.Daniel Dunbar2011-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124870 91177308-0d34-0410-b5e6-96231b3b80d8
* Introducing a new method of tracking register pressure. We can'tAndrew Trick2011-02-04
| | | | | | | | | | | | | | | | precisely track pressure on a selection DAG, but we can at least keep it balanced. This design accounts for various interesting aspects of selection DAGS: register and subregister copies, glued nodes, dead nodes, unused registers, etc. Added SUnit::NumRegDefsLeft and ScheduleDAGSDNodes::RegDefIter. Note: I disabled PrescheduleNodesWithMultipleUses when register pressure is enabled, based on no evidence other than I don't think it makes sense to have both enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124853 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceBob Wilson2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124830 91177308-0d34-0410-b5e6-96231b3b80d8
* Edit a comment for consistency.Bob Wilson2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124829 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved to Clang's source tree its configuration options and associatedOscar Fuentes2011-02-03
| | | | | | macros. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124824 91177308-0d34-0410-b5e6-96231b3b80d8
* Add XCore intrinsics for resource instructions.Richard Osborne2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124794 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply this.Eric Christopher2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124779 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert 124765 in an attempt to find the cycle breaking bootstrap.Eric Christopher2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124778 91177308-0d34-0410-b5e6-96231b3b80d8
* Platform tests for `sys/uio.h' header and `writev' function.Oscar Fuentes2011-02-03
| | | | | | This is the cmake equivalent for r124769. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124775 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_fd_ostream: Add a SetUseAtomicWrites() method (uses writev).Daniel Dunbar2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124771 91177308-0d34-0410-b5e6-96231b3b80d8
* Regenerate configure.Daniel Dunbar2011-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124770 91177308-0d34-0410-b5e6-96231b3b80d8
* Defer SplitKit value mapping until all defs are available.Jakob Stoklund Olesen2011-02-03
| | | | | | | | | | | | | | | | | | | The greedy register allocator revealed some problems with the value mapping in SplitKit. We would sometimes start mapping values before all defs were known, and that could change a value from a simple 1-1 mapping to a multi-def mapping that requires ssa update. The new approach collects all defs and register assignments first without filling in any live intervals. Only when finish() is called, do we compute liveness and mapped values. At this time we know with certainty which values map to multiple values in a split range. This also has the advantage that we can compute live ranges based on the remaining uses after rematerializing at split points. The current implementation has many opportunities for compile time optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124765 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to describe template value parameter in debug info.Devang Patel2011-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124755 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to describe template parameter type in debug info.Devang Patel2011-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124752 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove NoVendor and NoOS, added in commit 123990, from Triple. While itDuncan Sands2011-02-02
| | | | | | | | | | may be useful to understand "none", this is not the place for it. Tweak the fix to Normalize while there: the fix added in 123990 works correctly, but I like this way better. Finally, now that Triple understands some non-trivial environment values, teach the unittests about them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124720 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix reassociate to clear optional flags, such as nsw.Dan Gohman2011-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124712 91177308-0d34-0410-b5e6-96231b3b80d8
* Given a pair of floating point load and store, if there are no other uses ofEvan Cheng2011-02-02
| | | | | | | | | | | | | | | | | | | | the load, then it may be legal to transform the load and store to integer load and store of the same width. This is done if the target specified the transformation as profitable. e.g. On arm, this can transform: vldr.32 s0, [] vstr.32 s0, [] to ldr r12, [] str r12, [] rdar://8944252 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124708 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typo.Bob Wilson2011-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124705 91177308-0d34-0410-b5e6-96231b3b80d8