Revision tags: llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
#
f00654e3 |
| 23-Jun-2015 |
Alexander Kornienko <alexfh@google.com> |
Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.
llvm-svn: 240390
|
#
ea45d834 |
| 22-Jun-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
Linker: Do not expect comdat to exist in source module.
llvm-svn: 240341
|
#
70bc5f13 |
| 19-Jun-2015 |
Alexander Kornienko <alexfh@google.com> |
Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-c
Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/
Thanks to Eugene Kosov for the original patch!
llvm-svn: 240137
show more ...
|
#
7fddeccb |
| 17-Jun-2015 |
David Majnemer <david.majnemer@gmail.com> |
Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.
This isn't desirable because: - All LandingPadInsts in the same function
Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.
This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information.
- There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function.
Differential Revision: http://reviews.llvm.org/D10429
llvm-svn: 239940
show more ...
|
#
3bf3f1f5 |
| 15-Jun-2015 |
Yaron Keren <yaron.keren@gmail.com> |
Rangify several for loops, NFC.
llvm-svn: 239733
|
#
ff715e2d |
| 12-Jun-2015 |
Eli Bendersky <eliben@google.com> |
Fix returning error message in LLVMLinkModules
On error, the temporary output stream wouldn't be flushed and therefore the caller would see an empty error message.
Patch by Antoine Pitrou
Differen
Fix returning error message in LLVMLinkModules
On error, the temporary output stream wouldn't be flushed and therefore the caller would see an empty error message.
Patch by Antoine Pitrou
Differential Revision: http://reviews.llvm.org/D10241
llvm-svn: 239646
show more ...
|
#
97cb5657 |
| 15-May-2015 |
Eric Christopher <echristo@gmail.com> |
While in GlobalValue fix the function(s) that don't follow the naming convention and update users.
llvm-svn: 237461
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1 |
|
#
f64246be |
| 29-Apr-2015 |
David Blaikie <dblaikie@gmail.com> |
[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space
Many of the callers already have the pointer type anyway, and for the coup
[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space
Many of the callers already have the pointer type anyway, and for the couple of callers that don't it's pretty easy to call PointerType::get on the pointee type and address space.
This avoids LLParser from using PointerType::getElementType when parsing GlobalAliases from IR.
llvm-svn: 236160
show more ...
|
#
a9308c49 |
| 29-Apr-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
IR: Give 'DI' prefix to debug info metadata
Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the
IR: Give 'DI' prefix to debug info metadata
Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week.
Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course.
Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph).
Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit.
llvm-svn: 236120
show more ...
|
#
c8d987b1 |
| 24-Apr-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Linker: Copy over function metadata attachments
Update `lib/Linker` to handle `Function` metadata attachments. The attachments stick with the function body.
llvm-svn: 235786
|
#
e868123d |
| 22-Apr-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Linker: Add flag to override linkage rules
Add a flag to lib/Linker (and `llvm-link`) to override linkage rules. When set, the functions in the source module *always* replace those in the destinatio
Linker: Add flag to override linkage rules
Add a flag to lib/Linker (and `llvm-link`) to override linkage rules. When set, the functions in the source module *always* replace those in the destination module.
The `llvm-link` option is `-override=abc.ll`. All the "regular" modules are loaded and linked first, followed by the `-override` modules. This is useful for debugging workflows where some subset of the module (e.g., a single function) is extracted into a separate file where it's optimized differently, before being merged back in.
Patch by Luqman Aden!
llvm-svn: 235473
show more ...
|
#
2fbe1354 |
| 20-Apr-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
DebugInfo: Delete subclasses of DIScope
Delete subclasses of (the already defunct) `DIScope`, updating users to use the raw pointers from the `Metadata` hierarchy directly.
llvm-svn: 235356
|
#
537b4a81 |
| 14-Apr-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
DebugInfo: Gut DISubprogram and DILexicalBlock*
Gut the `DIDescriptor` wrappers around `MDLocalScope` subclasses. Note that `DILexicalBlock` wraps `MDLexicalBlockBase`, not `MDLexicalBlock`.
llvm-
DebugInfo: Gut DISubprogram and DILexicalBlock*
Gut the `DIDescriptor` wrappers around `MDLocalScope` subclasses. Note that `DILexicalBlock` wraps `MDLexicalBlockBase`, not `MDLexicalBlock`.
llvm-svn: 234850
show more ...
|
#
9d1cf4c1 |
| 06-Apr-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
IR: Stop using DIDescriptor::is*() and auto-casting
`DIDescriptor`'s subclasses allow construction from incompatible pointers, and `DIDescriptor` defines a series of `isa<>`-like functions (e.g., `i
IR: Stop using DIDescriptor::is*() and auto-casting
`DIDescriptor`'s subclasses allow construction from incompatible pointers, and `DIDescriptor` defines a series of `isa<>`-like functions (e.g., `isCompileUnit()` instead of `isa<MDCompileUnit>()`) that clients tend to use like this:
if (DICompileUnit(N).isCompileUnit()) foo(DICompileUnit(N));
These construction patterns work together to make `DIDescriptor` behave differently from normal pointers.
Instead, use built-in `isa<>`, `dyn_cast<>`, etc., and only build `DIDescriptor`s from pointers that are valid for their type.
I've split this into a few commits for different parts of LLVM and clang (to decrease the patch size and increase the chance of review). Generally the changes I made were NFC, but in a few places I made things stricter if it made sense from the surrounded code.
Eventually a follow-up commit will remove the API for the "old" way.
llvm-svn: 234255
show more ...
|
#
c947892d |
| 26-Mar-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Reapply "Linker: Drop function pointers for overridden subprograms"
This reverts commit r233254, effectively reapplying r233164 (and its successors), with an additional testcase for when subprograms
Reapply "Linker: Drop function pointers for overridden subprograms"
This reverts commit r233254, effectively reapplying r233164 (and its successors), with an additional testcase for when subprograms match exactly. This fixes PR22792 (again).
I'm using the same approach, but I've moved up the call to `stripReplacedSubprograms()`. The function pointers need to be dropped before mapping any metadata from the source module, or else this can drop the function from new subprograms that have merged (via Metadata uniquing) with the old ones. Dropping the pointers first prevents them from merging.
**** The original commit message follows. ****
Linker: Drop function pointers for overridden subprograms
Instead of dropping subprograms that have been overridden, just set their function pointers to `nullptr`. This is a minor adjustment to the stop-gap fix for PR21910 committed in r224487, and fixes the crasher from PR22792.
The problem that r224487 put a band-aid on: how do we find the canonical subprogram for a `Function`? Since the backend currently relies on `DebugInfoFinder` (which does a naive in-order traversal of compile units and picks the first subprogram) for this, r224487 tried dropping non-canonical subprograms.
Dropping subprograms fails because the backend *also* builds up a map from subprogram to compile unit (`DwarfDebug::SPMap`) based on the subprogram lists. A missing subprogram causes segfaults later when an inlined reference (such as in this testcase) is created.
Instead, just drop the `Function` pointer to `nullptr`, which nicely mirrors what happens when an already-inlined `Function` is optimized out. We can't really be sure that it's the same definition anyway, as the testcase demonstrates.
This still isn't completely satisfactory. Two flaws at least that I can think of:
- I still haven't found a straightforward way to make this symmetric in the IR. (Interestingly, the DWARF output is already symmetric, and I've tested for that to be sure we don't regress.) - Using `DebugInfoFinder` to find the canonical subprogram for a function is kind of crazy. We should just attach metadata to the function, like this:
define weak i32 @foo(i32, i32) !dbg !MDSubprogram(...) {
llvm-svn: 233302
show more ...
|
#
71242306 |
| 26-Mar-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Revert "Linker: Drop function pointers for overridden subprograms"
This reverts commit r233164 and its testcase follow-ups in r233165, r233207, r233214, and r233221. It apparently unleashed an LTO
Revert "Linker: Drop function pointers for overridden subprograms"
This reverts commit r233164 and its testcase follow-ups in r233165, r233207, r233214, and r233221. It apparently unleashed an LTO bootstrap failure, at least on Darwin:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/3376/
I'm reproducing now.
llvm-svn: 233254
show more ...
|
#
004ced3b |
| 25-Mar-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Linker: Drop function pointers for overridden subprograms
Instead of dropping subprograms that have been overridden, just set their function pointers to `nullptr`. This is a minor adjustment to the
Linker: Drop function pointers for overridden subprograms
Instead of dropping subprograms that have been overridden, just set their function pointers to `nullptr`. This is a minor adjustment to the stop-gap fix for PR21910 committed in r224487, and fixes the crasher from PR22792.
The problem that r224487 put a band-aid on: how do we find the canonical subprogram for a `Function`? Since the backend currently relies on `DebugInfoFinder` (which does a naive in-order traversal of compile units and picks the first subprogram) for this, r224487 tried dropping non-canonical subprograms.
Dropping subprograms fails because the backend *also* builds up a map from subprogram to compile unit (`DwarfDebug::SPMap`) based on the subprogram lists. A missing subprogram causes segfaults later when an inlined reference (such as in this testcase) is created.
Instead, just drop the `Function` pointer to `nullptr`, which nicely mirrors what happens when an already-inlined `Function` is optimized out. We can't really be sure that it's the same definition anyway, as the testcase demonstrates.
This still isn't completely satisfactory. Two flaws at least that I can think of:
- I still haven't found a straightforward way to make this symmetric in the IR. (Interestingly, the DWARF output is already symmetric, and I've tested for that to be sure we don't regress.) - Using `DebugInfoFinder` to find the canonical subprogram for a function is kind of crazy. We should just attach metadata to the function, like this:
define weak i32 @foo(i32, i32) !dbg !MDSubprogram(...) {
llvm-svn: 233164
show more ...
|
Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1 |
|
#
a28d91d8 |
| 10-Mar-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
DataLayout is mandatory, update the API to reflect it with references.
Summary: Now that the DataLayout is a mandatory part of the module, let's start cleaning the codebase. This patch is a first at
DataLayout is mandatory, update the API to reflect it with references.
Summary: Now that the DataLayout is a mandatory part of the module, let's start cleaning the codebase. This patch is a first attempt at doing that.
This patch is not exactly NFC as for instance some places were passing a nullptr instead of the DataLayout, possibly just because there was a default value on the DataLayout argument to many functions in the API. Even though it is not purely NFC, there is no change in the validation.
I turned as many pointer to DataLayout to references, this helped figuring out all the places where a nullptr could come up.
I had initially a local version of this patch broken into over 30 independant, commits but some later commit were cleaning the API and touching part of the code modified in the previous commits, so it seemed cleaner without the intermediate state.
Test Plan:
Reviewers: echristo
Subscribers: llvm-commits
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231740
show more ...
|
#
a5b9e1cf |
| 06-Mar-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remember to move a type to the correct set when setting the body.
We would set the body of a struct type (therefore making it non-opaque) but were forgetting to move it to the non-opaque set.
Fixes
Remember to move a type to the correct set when setting the body.
We would set the body of a struct type (therefore making it non-opaque) but were forgetting to move it to the non-opaque set.
Fixes pr22807.
llvm-svn: 231442
show more ...
|
#
46a43556 |
| 04-Mar-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
Make DataLayout Non-Optional in the Module
Summary: DataLayout keeps the string used for its creation.
As a side effect it is no longer needed in the Module. This is "almost" NFC, the string is no
Make DataLayout Non-Optional in the Module
Summary: DataLayout keeps the string used for its creation.
As a side effect it is no longer needed in the Module. This is "almost" NFC, the string is no longer canonicalized, you can't rely on two "equals" DataLayout having the same string returned by getStringRepresentation().
Get rid of DataLayoutPass: the DataLayout is in the Module
The DataLayout is "per-module", let's enforce this by not duplicating it more than necessary. One more step toward non-optionality of the DataLayout in the module.
Make DataLayout Non-Optional in the Module
Module->getDataLayout() will never returns nullptr anymore.
Reviewers: echristo
Subscribers: resistor, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D7992
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231270
show more ...
|
#
a57d588c |
| 02-Mar-2015 |
Juergen Ributzka <juergen@apple.com> |
Restore LLVMLinkModules C API until it is properly deprecated.
Add the enum "LLVMLinkerMode" back for backwards-compatibility and add the linker mode parameter back to the "LLVMLinkModules" function
Restore LLVMLinkModules C API until it is properly deprecated.
Add the enum "LLVMLinkerMode" back for backwards-compatibility and add the linker mode parameter back to the "LLVMLinkModules" function. The paramter is ignored and has no effect.
Patch provided by: Filip Pizlo Reviewed by: Rafael and Sean
llvm-svn: 230988
show more ...
|
Revision tags: llvmorg-3.6.0 |
|
#
6487ce95 |
| 24-Feb-2015 |
Manman Ren <manman.ren@gmail.com> |
[LTO API] add lto_codegen_set_module to set the destination module.
When debugging LTO issues with ld64, we use -save-temps to save the merged optimized bitcode file, then invoke ld64 again on the s
[LTO API] add lto_codegen_set_module to set the destination module.
When debugging LTO issues with ld64, we use -save-temps to save the merged optimized bitcode file, then invoke ld64 again on the single bitcode file to speed up debugging code generation passes and ld64 stuff after code generation.
llvm linking a single bitcode file via lto_codegen_add_module will generate a different bitcode file from the single input. With the newly-added lto_codegen_set_module, we can make sure the destination module is the same as the input.
lto_codegen_set_module will transfer the ownship of the module to code generator.
rdar://19024554
llvm-svn: 230290
show more ...
|
Revision tags: llvmorg-3.6.0-rc4 |
|
#
6cd780ff |
| 17-Feb-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
Prefer SmallVector::append/insert over push_back loops.
Same functionality, but hoists the vector growth out of the loop.
llvm-svn: 229500
|
Revision tags: llvmorg-3.6.0-rc3 |
|
#
c43df518 |
| 13-Feb-2015 |
Akira Hatanaka <ahatanaka@apple.com> |
[LinkModules] Change the way ModuleLinker merges triples.
This commit makes the following changes:
- Stop issuing a warning when the triples' string representations do not match exactly if the Tr
[LinkModules] Change the way ModuleLinker merges triples.
This commit makes the following changes:
- Stop issuing a warning when the triples' string representations do not match exactly if the Triple objects generated from the strings compare equal. - On Apple platforms, choose the triple that has the larger minimum version number.
rdar://problem/16743513
Differential Revision: http://reviews.llvm.org/D7591
llvm-svn: 228999
show more ...
|
Revision tags: llvmorg-3.6.0-rc2 |
|
#
dab999d5 |
| 20-Jan-2015 |
Manman Ren <manman.ren@gmail.com> |
[llvm link] Destroy ConstantArrays in LLVMContext if they are not used.
ConstantArrays constructed during linking can cause quadratic memory explosion. An example is the ConstantArrays constructed w
[llvm link] Destroy ConstantArrays in LLVMContext if they are not used.
ConstantArrays constructed during linking can cause quadratic memory explosion. An example is the ConstantArrays constructed when linking in GlobalVariables with appending linkage.
Releasing all unused constants can cause a 20% LTO compile-time slowdown for a large application. So this commit releases unused ConstantArrays only.
rdar://19040716. It reduces memory footprint from 20+G to 6+G.
llvm-svn: 226592
show more ...
|