summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Debug Info: revert r222195, r222210 and r222239.Manman Ren2014-11-211-1/+1
| | | | | | | This is no longer needed after David's fix at r222377 + r222485. rdar://18958417 llvm-svn: 222563
* Add params() to FunctionType. NFC.Rafael Espindola2014-11-211-2/+4
| | | | | | While at it, also use makeArrayRef in elements(). llvm-svn: 222556
* Add and use a helper elements() to StructType. NFC.Rafael Espindola2014-11-211-0/+4
| | | | llvm-svn: 222553
* Fix formatting. NFC.Rafael Espindola2014-11-211-19/+18
| | | | llvm-svn: 222545
* DAGCombiner: Allow the DAGCombiner to combine multiple FDIVs with the same ↵Hao Liu2014-11-211-0/+6
| | | | | | | | | | | | divisor info FMULs by the reciprocal. E.g., ( a / D; b / D ) -> ( recip = 1.0 / D; a * recip; b * recip) A hook is added to allow the target to control whether it needs to do such combine. Reviewed in http://reviews.llvm.org/D6334 llvm-svn: 222510
* Fix a silly bug in StreamingMemoryObject.cpp.Rafael Espindola2014-11-211-4/+5
| | | | | | | The logic for detecting EOF was wrong and would fail if we ever requested more than 16k past the last read position. llvm-svn: 222505
* [MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is deadLang Hames2014-11-211-10/+0
| | | | | | now that the old JIT has been removed. llvm-svn: 222494
* [MCJIT] Remove JITEventListener::NotifyFunctionEmitted - this method is deadLang Hames2014-11-201-7/+0
| | | | | | now that the legacy JIT has been removed. llvm-svn: 222453
* Update template specialization to reflect API changes.Michael Ilseman2014-11-201-2/+3
| | | | | | | | | po_iterator_storage's insertEdge was updated to reflect the API changes from many of our insert methods in r222334, however the template specialization for external storage was not updated. This updates the specialization. llvm-svn: 222446
* ADT: windows itanium targets msvcrt.dllSaleem Abdulrasool2014-11-191-1/+2
| | | | | | | Update the isOSMSVCRT to correctly identify that windows-itanium uses msvcrt.dll. llvm-svn: 222389
* Introduce register dump helperMatthias Braun2014-11-191-0/+4
| | | | llvm-svn: 222379
* AliasSetTracker: UnknownInsts should contribute to the refcountDavid Majnemer2014-11-191-1/+4
| | | | | | | | | | | | | | | | | | | AliasSetTracker::addUnknown may create an AliasSet devoid of pointers just to contain an instruction if no suitable AliasSet already exists. It will then AliasSet::addUnknownInst and we will be done. However, it's possible for addUnknown to choose an existing AliasSet to addUnknownInst. If this were to occur, we are in a bit of a pickle: removing pointers from the AliasSet can cause the entire AliasSet to become destroyed, taking our unknown instructions out with them. Instead, keep track whether or not our AliasSet has any unknown instructions. This fixes PR21582. llvm-svn: 222338
* Add missing headerDavid Blaikie2014-11-191-0/+1
| | | | llvm-svn: 222337
* Update SetVector to rely on the underlying set's insert to return a ↵David Blaikie2014-11-198-17/+25
| | | | | | | | | | | | | pair<iterator, bool> This is to be consistent with StringSet and ultimately with the standard library's associative container insert function. This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions... llvm-svn: 222334
* [SeparateConstOffsetFromGEP] Allow SeparateConstOffsetFromGEP pass to lower ↵Hao Liu2014-11-191-1/+3
| | | | | | | | | | | | GEPs. If LowerGEP is enabled, it can lower a GEP with multiple indices into GEPs with a single index or arithmetic operations. Lowering GEPs can always extract structure indices. Lowering GEPs can also give use more optimization opportunities. It can benefit passes like CSE, LICM and CGP. Reviewed in http://reviews.llvm.org/D5864 llvm-svn: 222328
* Remove StringMap::GetOrCreateValue in favor of StringMap::insertDavid Blaikie2014-11-194-23/+9
| | | | | | | | | | | | | | Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like it'll make the code easier to understand to anyone working with standard data structures. (I also updated many references to the Entry's key and value to use first() and second instead of getKey{Data,Length,} and get/setValue - for similar consistency) Also removes the GetOrCreateValue functions so there's less surface area to StringMap to fix/improve/change/accommodate move semantics, etc. llvm-svn: 222319
* Expose LLVM version string via macro in llvm-config.h, and modify Go bindingsPeter Collingbourne2014-11-193-0/+9
| | | | | | to make use of it. llvm-svn: 222307
* Make StringSet::insert return pair<iterator, bool> like other ↵David Blaikie2014-11-191-13/+2
| | | | | | | | | | | | self-associative containers StringSet is still a bit dodgy in that it exposes the raw iterator of the StringMap parent, which exposes the weird detail that StringSet actually has a 'value'... but anyway, this is useful for a handful of clients that want to reference the newly inserted/persistent string data in the StringSet/Map/Entry/thing. llvm-svn: 222302
* Use a memcpy so that type based alias analysis sees the change.Rafael Espindola2014-11-191-1/+3
| | | | | | | | | | | | | | | | | The other option would be to do something like if (that.isSingleWord()) VAL = that.VAL; else pVal = that.pVal This bug was causing 86TTI::getIntImmCost to be miscompiled in a LTO bootstrap in stage2, causing the build of stage3 to fail. LLVM is getting quiet good at exploiting this. Not sure if there is anything a sanitizer could do to help llvm-svn: 222294
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-191-0/+39
| | | | llvm-svn: 222289
* Introduce llvm::SplitAllCriticalEdgesKostya Serebryany2014-11-191-0/+5
| | | | | | | | | | | | | | | | | | | | Summary: move the code from BreakCriticalEdges::runOnFunction() into a separate utility function llvm::SplitAllCriticalEdges() so that it can be used independently. No functionality change intended. Test Plan: check-llvm Reviewers: nlewycky Reviewed By: nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6313 llvm-svn: 222288
* Fix an inaccurate commentJustin Bogner2014-11-181-2/+1
| | | | llvm-svn: 222267
* IR: Sink MDNode::Hash down to GenericMDNode::HashDuncan P. N. Exon Smith2014-11-181-5/+3
| | | | | | Part of PR21532. llvm-svn: 222212
* IR: Move MDNode operands from the back to the frontDuncan P. N. Exon Smith2014-11-181-17/+22
| | | | | | | | | | | | | | | | | Having the operands at the back prevents subclasses from safely adding fields. Move them to the front. Instead of replicating the custom `malloc()`, `free()` and `DestroyFlag` logic that was there before, overload `new` and `delete`. I added calls to a new `GenericMDNode::dropAllReferences()` in `LLVMContextImpl::~LLVMContextImpl()`. There's a maze of callbacks happening during teardown, and this resolves them before we enter the destructors. Part of PR21532. llvm-svn: 222211
* Support ELF files of unknown type.Michael J. Spencer2014-11-181-0/+1
| | | | llvm-svn: 222208
* IR: Split MDNode into GenericMDNode and MDNodeFwdDeclDuncan P. N. Exon Smith2014-11-182-13/+71
| | | | | | | | | | | | | | | | | | | Split `MDNode` into two classes: - `GenericMDNode`, which is uniquable (and for now, always starts uniqued). Once `Metadata` is split from the `Value` hierarchy, this class will lose the ability to RAUW itself. - `MDNodeFwdDecl`, which is used for the "temporary" interface, is never uniqued, and isn't managed by `LLVMContext` at all. I've left most of the guts in `MDNode` for now, but I'll incrementally move things to the right places (or delete the functionality, as appropriate). Part of PR21532. llvm-svn: 222205
* Debug Info: In DIBuilder, the context field of a global variable is updated toManman Ren2014-11-181-1/+1
| | | | | | | | | | | use DIScopeRef. A paired commit at clang will follow to show cases where we will use an identifer for the context of a global variable. rdar://18958417 llvm-svn: 222195
* IR: Simplify uniquing for MDNodeDuncan P. N. Exon Smith2014-11-171-4/+3
| | | | | | | | | | | | | | | | | | Change uniquing from a `FoldingSet` to a `DenseSet` with custom `DenseMapInfo`. Unfortunately, this doesn't save any memory, since `DenseSet<T>` is a simple wrapper for `DenseMap<T, char>`, but I'll come back to fix that later. I used the name `GenericDenseMapInfo` to the custom `DenseMapInfo` since I'll be splitting `MDNode` into two classes soon: `MDNodeFwdDecl` for temporaries, and `GenericMDNode` for everything else. I also added a non-debug-info reduced version of a type-uniquing test that started failing on an earlier draft of this patch. Part of PR21532. llvm-svn: 222191
* Revert "ADT: correctly report isMSVCEnvironment for windows itanium"Reid Kleckner2014-11-171-1/+0
| | | | | | This reverts commit r222180. llvm-svn: 222188
* ADT: correctly report isMSVCEnvironment for windows itaniumSaleem Abdulrasool2014-11-171-0/+1
| | | | | | | The itanium environment on Windows uses MSVC and is a MSVC environment. Report this correctly. llvm-svn: 222180
* Factor common code it Linker::init.Rafael Espindola2014-11-171-0/+1
| | | | | | The TypeFinder was not being used in one of the constructors. llvm-svn: 222172
* Revert commits r222146 and r222137.Rafael Espindola2014-11-171-3/+5
| | | | | | | | | They were producing the wrong result if NumBits == BitsInWord. The old mask produced -1, the new mask 0. This should fix the 32 bit bots. llvm-svn: 222166
* Fix GraphTraits for "const CallGraphNode *" and "const CallGraph *"Rafael Espindola2014-11-171-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The specializations were broken. For example, void foo(const CallGraph *G) { auto I = GraphTraits<const CallGraph *>::nodes_begin(G); auto K = I++; ... } or void bar(const CallGraphNode *N) { auto I = GraphTraits<const CallGraphNode *>::nodes_begin(G); auto K = I++; .... } would not compile. Patch by Speziale Ettore! llvm-svn: 222149
* Avoid undefined behavior by masking the shift amount.Rafael Espindola2014-11-171-2/+2
| | | | | | Should hopefully fix the mips bots. llvm-svn: 222146
* Use a more canonical way of computing a mask with N trailing 1s. NFC.Rafael Espindola2014-11-171-5/+3
| | | | llvm-svn: 222137
* [Thumb1] Re-write emitThumbRegPlusImmediateOliver Stannard2014-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was motivated by a bug which caused code like this to be miscompiled: declare void @take_ptr(i8*) define void @test() { %addr1.32 = alloca i8 %addr2.32 = alloca i32, i32 1028 call void @take_ptr(i8* %addr1) ret void } This was emitting the following assembly to get the value of %addr1: add r0, sp, #1020 add r0, r0, #8 However, "add r0, r0, #8" is not a valid Thumb1 instruction, and this could not be assembled. The generated object file contained this, resulting in r0 holding SP+8 rather tha SP+1028: add r0, sp, #1020 add r0, sp, #8 This function looked like it could have caused miscompilations for other combinations of registers and offsets (though I don't think it is currently called with these), and the heuristic it used did not match the emitted code in all cases. llvm-svn: 222125
* Object, COFF: Tighten the object file parserDavid Majnemer2014-11-171-6/+8
| | | | | | | | | | | | We were a little lax in a few areas: - We pretended that import libraries were like any old COFF file, they are not. In fact, they aren't really COFF files at all, we should probably grow some specialized functionality to handle them smarter. - Our symbol iterators were more than happy to attempt to go past the end of the symbol table if you had a symbol with a bad list of auxiliary symbols. llvm-svn: 222124
* Move register class name strings to a single array in MCRegisterInfo to ↵Craig Topper2014-11-172-9/+13
| | | | | | | | reduce static table size and number of relocation entries. Indices into the table are stored in each MCRegisterClass instead of a pointer. A new method, getRegClassName, is added to MCRegisterInfo and TargetRegisterInfo to lookup the string in the table. llvm-svn: 222118
* Add back r222061 with a fix.Rafael Espindola2014-11-173-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This adds back r222061, but now calls initializePAEvalPass from the correct library to avoid link problems. Original message: Don't make assumptions about the name of private global variables. Private variables are can be renamed, so it is not reliable to make decisions on the name. The name is also dropped by the assembler before getting to the linker, so using the name causes a disconnect between how llvm makes a decision (var name) and how the linker makes a decision (section it is in). This patch changes one case where we were looking at the variable name to use the section instead. Test tuning by Michael Gottesman. llvm-svn: 222117
* Fix typoTobias Grosser2014-11-161-1/+1
| | | | llvm-svn: 222110
* Convert some EVTs to MVTs where only a SimpleValueType is needed.Craig Topper2014-11-161-4/+4
| | | | llvm-svn: 222109
* [DependenceAnalysis] Allow subscripts of different typesJingyue Wu2014-11-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several places in DependenceAnalysis assumes both SCEVs in a subscript pair share the same integer type. For instance, isKnownPredicate calls SE->getMinusSCEV(X, Y) which asserts X and Y share the same type. However, DependenceAnalysis fails to ensure this assumption when producing a subscript pair, causing tests such as NonCanonicalizedSubscript to crash. With this patch, DependenceAnalysis runs unifySubscriptType before producing any subscript pair, ensuring the assumption. Test Plan: Added NonCanonicalizedSubscript.ll on which DependenceAnalysis before the fix crashed because subscripts have different types. Reviewers: spop, sebpop, jingyue Reviewed By: jingyue Subscribers: eliben, meheff, llvm-commits Differential Revision: http://reviews.llvm.org/D6289 llvm-svn: 222100
* Revert "Don't make assumptions about the name of private global variables."Reid Kleckner2014-11-153-4/+0
| | | | | | | | This reverts commit r222061. It's causing linker errors. llvm-svn: 222077
* DIBuilder: Use Constant instead of ValueDuncan P. N. Exon Smith2014-11-151-18/+17
| | | | | | | | | Make explicit the requirement that most IR values in `DIBuilder` are `Constant`. This requires a follow-up change in clang. Part of PR21532. llvm-svn: 222070
* DIBuilder: Change private helper function to static, NFCDuncan P. N. Exon Smith2014-11-151-7/+0
| | | | llvm-svn: 222068
* IR: Remove MDString logic for Value::hasName()Duncan P. N. Exon Smith2014-11-141-1/+1
| | | | | | This isn't necessary after r221960. llvm-svn: 222067
* DIBuilder: Cleanup access control style, NFCDuncan P. N. Exon Smith2014-11-141-2/+1
| | | | llvm-svn: 222066
* DI: Use Metadata for DITypeRef and DIScopeRefDuncan P. N. Exon Smith2014-11-141-5/+6
| | | | | | | | | | Now that `MDString` and `MDNode` have a common base class, use it. Note that it's not useful to assume subclasses of `Metadata` must be one or the other since we'll be adding more subclasses soon enough. Part of PR21532. llvm-svn: 222064
* Rename EH related stuff to be more preciseReid Kleckner2014-11-141-8/+12
| | | | | | | | | | | | | | | | | | | | Summary: The current "WinEH" exception handling type is more about Itanium-style LSDA tables layered on top of the Windows native unwind info format instead of .eh_frame tables or EHABI unwind info. Use the name "ItaniumWinEH" to better reflect the hybrid nature of the design. Also rename isExceptionHandlingDWARF to usesItaniumLSDAForExceptions, since the LSDA is part of the Itanium C++ ABI document, and not the DWARF standard. Reviewers: echristo Subscribers: llvm-commits, compnerd Differential Revision: http://reviews.llvm.org/D6279 llvm-svn: 222062
* Don't make assumptions about the name of private global variables.Rafael Espindola2014-11-143-0/+4
| | | | | | | | | | | | | | | | | Private variables are can be renamed, so it is not reliable to make decisions on the name. The name is also dropped by the assembler before getting to the linker, so using the name causes a disconnect between how llvm makes a decision (var name) and how the linker makes a decision (section it is in). This patch changes one case where we were looking at the variable name to use the section instead. Test tuning by Michael Gottesman. llvm-svn: 222061
OpenPOWER on IntegriCloud