summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)AuthorFilesLines
2016-06-25IR: Introduce llvm.type.checked.load intrinsic.Peter Collingbourne1-0/+54
This intrinsic safely loads a function pointer from a virtual table pointer using type metadata. This intrinsic is used to implement control flow integrity in conjunction with virtual call optimization. The virtual call optimization pass will optimize away llvm.type.checked.load intrinsics associated with devirtualized calls, thereby removing the type check in cases where it is not needed to enforce the control flow integrity constraint. This patch also introduces the capability to copy type metadata between global variables, and teaches the virtual call optimization pass to do so. Differential Revision: http://reviews.llvm.org/D21121 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273756 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24IR: New representation for CFI and virtual call optimization pass metadata.Peter Collingbourne4-234/+233
The bitset metadata currently used in LLVM has a few problems: 1. It has the wrong name. The name "bitset" refers to an implementation detail of one use of the metadata (i.e. its original use case, CFI). This makes it harder to understand, as the name makes no sense in the context of virtual call optimization. 2. It is represented using a global named metadata node, rather than being directly associated with a global. This makes it harder to manipulate the metadata when rebuilding global variables, summarise it as part of ThinLTO and drop unused metadata when associated globals are dropped. For this reason, CFI does not currently work correctly when both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable globals, and fails to associate metadata with the rebuilt globals. As I understand it, the same problem could also affect ASan, which rebuilds globals with a red zone. This patch solves both of those problems in the following way: 1. Rename the metadata to "type metadata". This new name reflects how the metadata is currently being used (i.e. to represent type information for CFI and vtable opt). The new name is reflected in the name for the associated intrinsic (llvm.type.test) and pass (LowerTypeTests). 2. Attach metadata directly to the globals that it pertains to, rather than using the "llvm.bitsets" global metadata node as we are doing now. This is done using the newly introduced capability to attach metadata to global variables (r271348 and r271358). See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html Differential Revision: http://reviews.llvm.org/D21053 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Support/ELF: Add R_AMDGPU_GOTPCREL relocationTom Stellard1-0/+4
Summary: We will start generating this in a future patch. Reviewers: arsenm, kzhuravl, rafael, ruiu, tony-tye Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Change the email address for commit access requests to my llvm address.Chris Lattner2-3/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273578 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[docs] Bump minimum version of CMake in its own docRenato Golin1-4/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273570 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21IR: Allow metadata attachments on declarations, and fix lazy loaded metadata ↵Peter Collingbourne1-10/+0
issue with globals. This change is motivated by an upcoming change to the metadata representation used for CFI. The indirect function call checker needs type information for external function declarations in order to correctly generate jump table entries for such declarations. We currently associate such type information with declarations using a global metadata node, but I plan [1] to move all such metadata to global object attachments. In bitcode, metadata attachments for function declarations appear in the global metadata block. This seems reasonable to me because I expect metadata attachments on declarations to be uncommon. In the long term I'd also expect this to be the case for CFI, because we'd want to use some specialized bitcode format for this metadata that could be read as part of the ThinLTO thin-link phase, which would mean that it would not appear in the global metadata block. To solve the lazy loaded metadata issue I was seeing with D20147, I use the same bitcode representation for metadata attachments for global variables as I do for function declarations. Since there's a use case for metadata attachments in the global metadata block, we might as well use that representation for global variables as well, at least until we have a mechanism for lazy loading global variables. In the assembly format, the metadata attachments appear after the "declare" keyword in order to avoid a parsing ambiguity. [1] http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html Differential Revision: http://reviews.llvm.org/D21052 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20[Kaleidoscope][BuildingAJIT] Remove some superfluous commas in Chapter 2.Lang Hames1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20[Kaleidoscope][BuildingAJIT] Fix a punctuation mistake in Chapter 2.Lang Hames1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16LangRef: Note expectations when loading with extra alignmentMatt Arsenault1-2/+14
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272914 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15Remove the ScalarReplAggregates passDavid Majnemer4-10/+4
Nearly all the changes to this pass have been done while maintaining and updating other parts of LLVM. LLVM has had another pass, SROA, which has superseded ScalarReplAggregates for quite some time. Differential Revision: http://reviews.llvm.org/D21316 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14Fix list of deprecated C API attribute functionsAmaury Sechet1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14IR: Introduce local_unnamed_addr attribute.Peter Collingbourne2-19/+35
If a local_unnamed_addr attribute is attached to a global, the address is known to be insignificant within the module. It is distinct from the existing unnamed_addr attribute in that it only describes a local property of the module rather than a global property of the symbol. This attribute is intended to be used by the code generator and LTO to allow the linker to decide whether the global needs to be in the symbol table. It is possible to exclude a global from the symbol table if three things are true: - This attribute is present on every instance of the global (which means that the normal rule that the global must have a unique address can be broken without being observable by the program by performing comparisons against the global's address) - The global has linkonce_odr linkage (which means that each linkage unit must have its own copy of the global if it requires one, and the copy in each linkage unit must be the same) - It is a constant or a function (which means that the program cannot observe that the unique-address rule has been broken by writing to the global) Although this attribute could in principle be computed from the module contents, LTO clients (i.e. linkers) will normally need to be able to compute this property as part of symbol resolution, and it would be inefficient to materialize every module just to compute it. See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html for earlier discussion. Part of the fix for PR27553. Differential Revision: http://reviews.llvm.org/D20348 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14[docs] Update AMDGPU relocation informationKonstantin Zhuravlyov1-13/+14
- Added new notation for specifying relocation calculation - Renamed: - R_AMDGPU_32_LOW -> R_AMDGPU_ABS32_LO - R_AMDGPU_32_HIGH -> R_AMDGPU_ABS32_HI - R_AMDGPU_64 -> R_AMDGPU_ABS64 - Added: - R_AMDGPU_REL32 - R_AMDGPU_REL64 - R_AMDGPU_ABS32 - Updated calculations for relative relocations Differential Revision: http://reviews.llvm.org/D21215 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14[FileCheck] Document --check-prefixes.Daniel Sanders1-0/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14Fix some typos in the Kaleidoscope tutorial (PR28120)Hans Wennborg3-15/+15
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13[SystemZ] Enable index register memory constraints for inline ASMUlrich Weigand1-4/+8
This enables use of the 'R' and 'T' memory constraints for inline ASM operands on SystemZ, which allow an index register as well as an immediate displacement. This patch includes corresponding documentation and test case updates. As with the last patch of this kind, I moved the 'm' constraint to the most general case, which is now 'T' (base + 20-bit signed displacement + index register). Author: colpell Differential Revision: http://reviews.llvm.org/D21239 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-12Make sure we have a Add/Remove/Has function for various thing that can have ↵Amaury Sechet1-2/+6
attribute. Summary: This also deprecated the get attribute function familly. Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight Subscribers: axw, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19181 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10Update call site attribute documentationMatt Arsenault1-2/+2
convergent is also accepted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10docs: Add AMDGPU relocation informationTom Stellard1-0/+51
Summary: This documents the various relocation types that are supported by the Radeon Open Compute (ROC) runtime (which is essentially the dynamic linker for AMDGPU). Only R_AMDGPU_32 is not currently supported by the ROC runtime, but it will usually be resolved at link time by lld. Patch by: Konstantin Zhuravlyov Reviewers: kzhuravl, rafael Subscribers: rafael, arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D20952 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09[docs] Fix indentation for a tool optionVedant Kumar1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09[SystemZ] Enable long displacement constraints for inline ASM operandsUlrich Weigand1-2/+4
This enables use of the 'S' constraint for inline ASM operands on SystemZ, which allows for a memory reference with a signed 20-bit immediate displacement. This patch includes corresponding documentation and test case updates. I've changed the 'T' constraint to match the new behavior for 'S', as 'T' also uses a long displacement (though index constraints are still not implemented). I also changed 'm' to match the behavior for 'S' as this will allow for a wider range of displacements for 'm', though correct me if that's not the right decision. Author: colpell Differential Revision: http://reviews.llvm.org/D21097 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08[libFuzzer] docs: merge two lines with cmake instructions, add ↵Kostya Serebryany1-6/+5
-DLLVM_ENABLE_ASSERTIONS=ON git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07[docs] fix the build by including ScudoHardenedAllocator into toc; mention ↵Kostya Serebryany2-2/+7
SourceBasedCodeCoverage.html in libFuzzer docs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07Retry^4 "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar1-0/+9
Changes since the initial commit: - Use echo instead of printf. This should side-step the character escaping issues on Windows. Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07Add info to SourceLevelDebugging about CodeViewReid Kleckner1-5/+78
Adds some discussion of the nature of the format, and some developer docs on how to work with it in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07[Kaleidoscope] Update Chapter 3 of the "Implementing a Language" tutorial toLang Hames1-8/+14
take into account modernizations in r246002 and r270381. Patch based on http://reviews.llvm.org/D20954 by Miroslav Hrncir. Thanks Miroslav! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271985 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07[sanitizer] Initial implementation of a Hardened AllocatorKostya Serebryany1-0/+117
Summary: This is an initial implementation of a Hardened Allocator based on Sanitizer Common's CombinedAllocator. It aims at mitigating heap based vulnerabilities by adding several features to the base allocator, while staying relatively fast. The following were implemented: - additional consistency checks on the allocation function parameters and on the heap chunks; - use of checksum protected chunk header, to detect corruption; - randomness to the allocator base; - delayed freelist (quarantine), to mitigate use after free and overall determinism. Additional mitigations are in the works. Reviewers: eugenis, aizatsky, pcc, krasin, vitalybuka, glider, dvyukov, kcc Subscribers: kubabrecka, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D20084 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06Revert "Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file""Vedant Kumar1-9/+0
This reverts commit r271953. It's still breaking on Windows, though the list initialization issue is fixed: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/3751 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271963 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar1-0/+9
Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. - Don't use list-initialization for a std::string in WeightedFile. Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271953 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06Revert "Retry "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar1-9/+0
This reverts commit r271949. It breaks the Windows build: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12796 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06Retry "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar1-0/+9
Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271949 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06Updating release notes for CMake version bumpChris Bieneman1-0/+2
CMake 3.4.3 is now required for building LLVM-based projects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[Kaleidoscope][BuildingAJIT] Fix hyphenation in chapter 2 title.Lang Hames1-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271924 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[Kaleidoscope][BuildingAJIT] More cleanup of Chapter 2.Lang Hames1-17/+18
Streamline some wording, fix a bug in the markup for the layer interface table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271917 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[Kaleidoscope][BuildingAJIT] Clean up sentence, remove comments from code block.Lang Hames1-4/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[Kaleidoscope][BuildingAJIT] Split up the code-block describing the substitutionLang Hames1-0/+8
of OptimizeLayer for CompileLayer in Chapter 2. Hopefully this will read a little more clearly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[Kaleidoscope][BuildingAJIT] Fix code-blocks in Chapter 2.Lang Hames1-4/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[Kaleidoscope][BuildingAJIT] Add tutorial text for Chapter 2.Lang Hames1-13/+292
This chapter discusses IR optimizations, the ORC IRTransformLayer, and the ORC layer concept itself. The text is still pretty rough, but I think the main ideas are there. Feedback is very welcome, as always. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271865 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-04[llvm-profdata] Revert r271709 and the 3 subsequent commits - the codeChandler Carruth1-9/+0
and/or tests aren't working on Windows currently. There seems to be some problem with quoting the file paths. I don't understand the test structure here or the code well enough to try to come up with a way to correctly handle paths with back slashes in them, and this has caused the Windows builds to be failing for 7 hours now, so I'm reverting the whole thing to bring them back to life. Sorry for the disruption, but a couple of these were bug fixes anyways that can be folded into a fresh commit. Reverts the following patches: r271756: Clean up the way we create the input filenames buffer (NFC) r271748: Fix use-after-free from discarded MemoryBuffer (NFC) r271710: Fix option description (NFC) r271709: Add option to ingest filepaths from a file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271760 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-03Add a FIXME note in the release notes about documenting ThinLTOMehdi Amini1-0/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-03[llvm-profdata] Add option to ingest filepaths from a fileVedant Kumar1-0/+9
Differential Revision: http://reviews.llvm.org/D20980 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02[libFuzzer] fix docsKostya Serebryany1-5/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02[libFuzzer] docs: add contact, mention more trophies Kostya Serebryany1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02Try to fix docs build after rL271440Tamas Berghammer1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01Add new LLVM_EXTERNAL_PROJECTS option to cmakeTamas Berghammer1-0/+8
The new option makes it possible to build external projects as part of the llvm build without copying (or symlinking) then into llvm/tool with specifying a few additional cmake variables. Example usage (2 additional project called foo and bar): -DLLVM_EXTERNAL_PROJECTS="Foo;Bar" -DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo -DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar Note: This is the extension of the approach we already support for clang/lldb/poly with adding an option to specify additional supported projects. Differential revision: http://reviews.llvm.org/D20838 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01[IR] Disallow loading and storing unsized typesSanjoy Das1-13/+14
Summary: It isn't clear what is the operational meaning of loading or storing an unsized types, since it cannot be lowered into something meaningful. Since there does not seem to be any practical need for it either, make such loads and stores illegal IR. Reviewers: majnemer, chandlerc Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D20846 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[Orc] Add conversion to/from RuntimeDyld::SymbolInfo for JITSymbol.Lang Hames1-1/+1
This tidies up some code that was manually constructing RuntimeDyld::SymbolInfo instances from JITSymbols. It will save more mess in the future when JITSymbol::getAddress is extended to return an Expected<TargetAddress> rather than just a TargetAddress, since we'll be able to embed the error checking in the conversion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31Add support for metadata attachments for global variables.Peter Collingbourne2-2/+13
This patch adds an IR, assembly and bitcode representation for metadata attachments for globals. Future patches will port existing features to use these new attachments. Differential Revision: http://reviews.llvm.org/D20074 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[CMake] Update to requiring CMake 3.4.3Chris Bieneman2-4/+6
Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20822 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[Docs] CodeGen has supported vector icmp/fcmp for a long time.Ahmed Bougacha1-6/+0
The IR support is already well-documented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271315 91177308-0d34-0410-b5e6-96231b3b80d8