summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
...
* Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector ↵Craig Topper2013-07-14
| | | | | | size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186274 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded forward declarations.Craig Topper2013-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186244 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert commit r186217 -- this is breaking bots:Chandler Carruth2013-07-13
| | | | | | | | | | http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328 Original commit log: Use the function attributes to pass along the stack protector buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186234 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed 80+ violation and added C++ to header.Michael Gottesman2013-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186225 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the function attributes to pass along the stack protector buffer size.Bill Wendling2013-07-12
| | | | | | | | Now that we have robust function attributes, don't use a command line option to specify the stack protecto buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186217 91177308-0d34-0410-b5e6-96231b3b80d8
* Change llvm-ar to use lib/Object.Rafael Espindola2013-07-12
| | | | | | | | | | | | | | | | | | | | | | This fixes two bugs is lib/Object that the use in llvm-ar found: * In OS X created archives, the name can be padded with nulls. Strip them. * In the constructor, remember the first non special member and use that in begin_children. This makes sure we skip all special members, not just the first one. The change to llvm-ar itself consist of * Using lib/Object for reading archives instead of ArchiveReader.cpp. * Writing the modified archive directly, instead of creating an in memory representation. The old Archive library was way more general than what is needed, as can be seen by the diffstat of this patch. Having llvm-ar using lib/Object now opens the way for creating regular symbol tables for both native objects and bitcode files so that we can use those archives for LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186197 91177308-0d34-0410-b5e6-96231b3b80d8
* TargetTransformInfo: address calculation parameter for gather/scatherArnold Schwaighofer2013-07-12
| | | | | | | | | | | Address calculation for gather/scather in vectorized code can incur a significant cost making vectorization unbeneficial. Add infrastructure to add cost. Tests and cost model for targets will be in follow-up commits. radar://14351991 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186187 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed comment in header of Block Frequency Impl and added text for C++ mode.Michael Gottesman2013-07-12
| | | | | | | This is a generic block implementation that works on more than machine blocks. The C++ mode addition is a bonus due to the extra space provided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186175 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark MDNode::getOperand as readonly.Benjamin Kramer2013-07-12
| | | | | | We can't inline it but we can still CSE calls to it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186156 91177308-0d34-0410-b5e6-96231b3b80d8
* Stylistic change.Shuxin Yang2013-07-12
| | | | | | | Thank Nick for figuring out these problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186146 91177308-0d34-0410-b5e6-96231b3b80d8
* Target/X86: Add explicit Win64 and System V/x86-64 calling conventions.Charles Davis2013-07-12
| | | | | | | | | | | | | | | Summary: This patch adds explicit calling convention types for the Win64 and System V/x86-64 ABIs. This allows code to override the default, and use the Win64 convention on a target that wants to use SysV (and vice-versa). This is needed to implement the `ms_abi` and `sysv_abi` GNU attributes. Reviewers: CC: git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186144 91177308-0d34-0410-b5e6-96231b3b80d8
* Sync SmallBitVector with BitVector. Add unit tests for the missing methods.Benjamin Kramer2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186123 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed up comments in TargetLowering.h to conform to the LLVM Style Guide.Michael Gottesman2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186121 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector ↵Craig Topper2013-07-11
| | | | | | size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186098 91177308-0d34-0410-b5e6-96231b3b80d8
* Use move semantics if possible to construct ConstantRanges.Benjamin Kramer2013-07-11
| | | | | | | Arithmetic on ConstantRanges creates a lot of large temporary APInts that benefit from move semantics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186091 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed "mode: c++" => "C++" at the suggestion of Nick Lewycky.Michael Gottesman2013-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186025 91177308-0d34-0410-b5e6-96231b3b80d8
* Update doxygen comment to match renamed parameters.Benjamin Kramer2013-07-10
| | | | | | Found by -Wdocumentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186021 91177308-0d34-0410-b5e6-96231b3b80d8
* Use status to implement file_size.Rafael Espindola2013-07-10
| | | | | | | | | | The status function is already using a syscall that returns the file size. Remember it and implement file_size as a simple wrapper. No functionally change, but clients that already use status now can avoid calling file_size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186016 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm/ADT/NullablePtr.h, there are no uses of it in-tree.Argyrios Kyrtzidis2013-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186006 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement categories for special case lists.Peter Collingbourne2013-07-09
| | | | | | | | | | | | | | | | | | | | | | | | A special case list can now specify categories for specific globals, which can be used to instruct an instrumentation pass to treat certain functions or global variables in a specific way, such as by omitting certain aspects of instrumentation while keeping others, or informing the instrumentation pass that a specific uninstrumentable function has certain semantics, thus allowing the pass to instrument callers according to those semantics. For example, AddressSanitizer now uses the "init" category instead of global-init prefixes for globals whose initializers should not be instrumented, but which in all other respects should be instrumented. The motivating use case is DataFlowSanitizer, which will have a number of different categories for uninstrumentable functions, such as "functional" which specifies that a function has pure functional semantics, or "discard" which indicates that a function's return value should not be labelled. Differential Revision: http://llvm-reviews.chandlerc.com/D1092 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185978 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a SpecialCaseList ctor which takes a MemoryBuffer to makePeter Collingbourne2013-07-09
| | | | | | | | it more unit testable, and fix memory leak in the other ctor. Differential Revision: http://llvm-reviews.chandlerc.com/D1090 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185976 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BlackList class to SpecialCaseList and move it to Transforms/Utils.Peter Collingbourne2013-07-09
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1089 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185975 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply an improved version of r180816/180817.Adrian Prantl2013-07-09
| | | | | | | | | | | | | | | Change the informal convention of DBG_VALUE machine instructions so that we can express a register-indirect address with an offset of 0. The old convention was that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain register values the combination reg, reg is used. MachineInstrBuilder::BuildMI knows how to build the new DBG_VALUES. rdar://problem/13658587 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185966 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed up the comments in FastISel.h so that they conform to the LLVM style ↵Michael Gottesman2013-07-09
| | | | | | guide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185964 91177308-0d34-0410-b5e6-96231b3b80d8
* Added "mode: c++" to FastISel.h header.Michael Gottesman2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185963 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and allStephen Lin2013-07-09
| | | | | | | | | | | | | | | | | | | | | | | | in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in order to resolve the following issues with fmuladd (i.e. optional FMA) intrinsics: 1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd intrinsics even if the subtarget does not support FMA instructions, leading to laughably bad code generation in some situations. 2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128, resulting in a call to a software fp128 FMA implementation. 3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize, etc. to types that support hardware FMAs. The function has also been slightly renamed for consistency and to force a merge/build conflict for any out-of-tree target implementing it. To resolve, see comments and fixed in-tree examples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185956 91177308-0d34-0410-b5e6-96231b3b80d8
* IRBuilder: add an assertion that checks if we try to get a debug loc from ↵Nadav Rotem2013-07-09
| | | | | | ->end(); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185952 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Revert r185476 and fix up TLS variant kindsUlrich Weigand2013-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the commit message to r185476 I wrote: >The PowerPC-specific modifiers VK_PPC_TLSGD and VK_PPC_TLSLD >correspond exactly to the generic modifiers VK_TLSGD and VK_TLSLD. >This causes some confusion with the asm parser, since VK_PPC_TLSGD >is output as @tlsgd, which is then read back in as VK_TLSGD. > >To avoid this confusion, this patch removes the PowerPC-specific >modifiers and uses the generic modifiers throughout. (The only >drawback is that the generic modifiers are printed in upper case >while the usual convention on PowerPC is to use lower-case modifiers. >But this is just a cosmetic issue.) This was unfortunately incorrect, there is is fact another, serious drawback to using the default VK_TLSLD/VK_TLSGD variant kinds: using these causes ELFObjectWriter::RelocNeedsGOT to return true, which in turn causes the ELFObjectWriter to emit an undefined reference to _GLOBAL_OFFSET_TABLE_. This is a problem on powerpc64, because it uses the TOC instead of the GOT, and the linker does not provide _GLOBAL_OFFSET_TABLE_, so the symbol remains undefined. This means shared libraries using TLS built with the integrated assembler are currently broken. While the whole RelocNeedsGOT / _GLOBAL_OFFSET_TABLE_ situation probably ought to be properly fixed at some point, for now I'm simply reverting the r185476 commit. Now this in turn exposes the breakage of handling @tlsgd/@tlsld in the asm parser that this check-in was originally intended to fix. To avoid this regression, I'm also adding a different fix for this problem: while common code now parses @tlsgd as VK_TLSGD, a special hack in the asm parser translates this code to the platform-specific VK_PPC_TLSGD that the back-end now expects. While this is not really pretty, it's self-contained and shouldn't hurt anything else for now. One the underlying problem is fixed, this hack can be reverted again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185945 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing getters. They will be used in llvm-ar.Rafael Espindola2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185937 91177308-0d34-0410-b5e6-96231b3b80d8
* Archive members cannot be larger than 4GB. Return a uint32_t.Rafael Espindola2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185936 91177308-0d34-0410-b5e6-96231b3b80d8
* We never compare iterators from two archives. Assert that.Rafael Espindola2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185934 91177308-0d34-0410-b5e6-96231b3b80d8
* Add getHeader helper and move ToHeader to the cpp file.Rafael Espindola2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185933 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute the size of an archive member in the constructor.Rafael Espindola2013-07-09
| | | | | | | It is always computed the same way (by parsing the header). Doing it in the constructor simplifies the callers a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185905 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove declare but not implemented methods.Rafael Espindola2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185904 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some code out of line. No functionality change.Rafael Espindola2013-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185901 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DebugInfo: remove unused helper function getDICompositeType."Eric Christopher2013-07-09
| | | | | | | This reverts commit r185876 as the functions appear to still be used by dragonegg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185890 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset ↵Nadav Rotem2013-07-08
| | | | | | both the BB and the insert point inside the BB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185883 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: remove unused helper function getDICompositeType.Manman Ren2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185876 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r185852.Manman Ren2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185861 91177308-0d34-0410-b5e6-96231b3b80d8
* Find xdot or xdot.py.Matt Arsenault2013-07-08
| | | | | | Ubuntu installs this as xdot, so finding xdot.py would fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185860 91177308-0d34-0410-b5e6-96231b3b80d8
* StringRef: add DenseMapInfo for StringRef.Manman Ren2013-07-08
| | | | | | | | | Remove the implementation in include/llvm/Support/YAMLTraits.h. Added a DenseMap type DITypeHashMap in DebugInfo.h: DenseMap<std::pair<StringRef, unsigned>, MDNode*> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185852 91177308-0d34-0410-b5e6-96231b3b80d8
* [ADT/NullablePtr] Allow implicit conversion of NullablePtr<OtherT> -> ↵Argyrios Kyrtzidis2013-07-08
| | | | | | NullablePtr<T> if OtherT is derived from T. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185851 91177308-0d34-0410-b5e6-96231b3b80d8
* Reland "Use Clang's __has_* macros in Compiler.h ..." with fixesReid Kleckner2013-07-08
| | | | | | | | | | | | | | | This reverts r185841 and relands r185831 without using __has_attribute(const). Clang prior to r161767 (between 3.1 and 3.2) does not accept __has_attribute(const) due to rdar://10253857. __const and __const__ are both keyword aliases of const, so they don't work either. I was able to repro the buildbot failure using clang 3.1 and this patch fixes it. Various important versions of XCode use clang 2.9-ish, so this workaround is necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185850 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a SCEV update problem.Shuxin Yang2013-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symptom is seg-fault, and the root cause is that a SCEV contains a SCEVUnknown which has null-pointer to a llvm::Value. This is how the problem take place: =================================== 1). In the pristine input IR, there are two relevant instrutions Op1 and Op2, Op1's corresponding SCEV (denoted as SCEV(op1)) is a SCEVUnknown, and SCEV(Op2) contains SCEV(Op1). None of these instructions are dead. Op1 : V1 = ... ... Op2 : V2 = ... // directly or indirectly (data-flow) depends on Op1 2) Optimizer (LSR in my case) generates an instruction holding the equivalent value of Op1, making Op1 dead. Op1': V1' = ... Op1: V1 = ... ; now dead) Op2 : V2 = ... //Now deps on Op1', but the SCEV(Op2) still contains SCEV(Op1) 3) Op1 is deleted, and call-back function is called to reset SCEV(Op1) to indicate it is invalid. However, SCEV(Op2) is not invalidated as well. 4) Following pass get the cached, invalid SCEV(Op2), and try to manipulate it, and cause segfault. The fix: ======== It seems there is no clean yet inexpensive fix. I write to dev-list soliciting good solution, unforunately no ack. So, I decide to fix this problem in a brute-force way: When ScalarEvolution::getSCEV is called, check if the cached SCEV contains a invalid SCEVUnknow, if yes, remove the cached SCEV, and re-evaluate the SCEV from scratch. I compile buch of big *.c and *.cpp, fortunately, I don't see any increase in compile time. Misc: ===== The reduced test-case has 2357 lines of code+other-stuff, too big to commit. rdar://14283433 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185843 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert: "Use Clang's __has_* macros in Compiler.h to test for features"Quentin Colombet2013-07-08
| | | | | | | This reverts r185831 and 185833. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185841 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format this enum.Rafael Espindola2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185835 91177308-0d34-0410-b5e6-96231b3b80d8
* We now always create files with the correct permissions. Simplify the interface.Rafael Espindola2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185834 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix Compiler.h for some self-hosting botsReid Kleckner2013-07-08
| | | | | | | I tested r185831 by self-hosting clang with a recent clang, and got no warnings. I haven't been able to reproduce the problem locally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185833 91177308-0d34-0410-b5e6-96231b3b80d8
* Use Clang's __has_* macros in Compiler.h to test for featuresReid Kleckner2013-07-08
| | | | | | | | | | | | | | | | | | When targetting Windows, clang does not define __GNUC__, and as a result we don't use our attributes with it. This leads to warnings about unused functions that are already annotated with LLVM_ATTRIBUTE_UNUSED. Rather than testing for __clang__, we can use its __has_attribute and __has_builtin macros directlty. While I'm here, conditionally define and use __GNUC_PREREQ for gcc version checks. Spelling the check out with three comparisons is verbose and error prone. Reviewers: aaron.ballman Differential Revision: http://llvm-reviews.chandlerc.com/D1080 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185831 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing per-argument doesNotAccessMemory accessors. No functionality changeNick Lewycky2013-07-07
| | | | | | | since it has no callers today. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185775 91177308-0d34-0410-b5e6-96231b3b80d8