| #
e5089e2e |
| 08-Dec-2017 |
Florian Hahn <[email protected]> |
[CodeExtractor] Add debug locations for new call and branch instrs.
Summary: If a partially inlined function has debug info, we have to add debug locations to the call instruction calling the outlin
[CodeExtractor] Add debug locations for new call and branch instrs.
Summary: If a partially inlined function has debug info, we have to add debug locations to the call instruction calling the outlined function. We use the debug location of the first instruction in the outlined function, as the introduced call transfers control to this statement and there is no other equivalent line in the source code.
We also use the same debug location for the branch instruction added to jump from artificial entry block for the outlined function, which just jumps to the first actual basic block of the outlined function.
Reviewers: davide, aprantl, rriddle, dblaikie, danielcdh, wmi
Reviewed By: aprantl, rriddle, danielcdh
Subscribers: eraman, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D40413
llvm-svn: 320199
show more ...
|
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
| #
71147559 |
| 13-Nov-2017 |
Florian Hahn <[email protected]> |
[CodeExtractor] Add missing AllowVarArgs initialization.
llvm-svn: 318029
|
| #
0e9dec67 |
| 13-Nov-2017 |
Florian Hahn <[email protected]> |
[PartialInliner] Inline vararg functions that forward varargs.
Summary: This patch extends the partial inliner to support inlining parts of vararg functions, if the vararg handling is done in the ou
[PartialInliner] Inline vararg functions that forward varargs.
Summary: This patch extends the partial inliner to support inlining parts of vararg functions, if the vararg handling is done in the outlined part.
It adds a `ForwardVarArgsTo` argument to InlineFunction. If it is non-null, all varargs passed to the inlined function will be added to all calls to `ForwardVarArgsTo`.
The partial inliner takes care to only pass `ForwardVarArgsTo` if the varargs handing is done in the outlined function. It checks that vastart is not part of the function to be inlined.
`test/Transforms/CodeExtractor/PartialInlineNoInline.ll` (already part of the repo) checks we do not do partial inlining if vastart is used in a basic block that will be inlined.
Reviewers: davide, davidxl, grosser
Reviewed By: davide, davidxl, grosser
Subscribers: gyiu, grosser, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D39607
llvm-svn: 318028
show more ...
|
| #
b93c0633 |
| 01-Nov-2017 |
Florian Hahn <[email protected]> |
[CodeExtractor] Fix iterator invalidation in findOrCreateBlockForHoisting.
Summary: By replacing branches to CommonExitBlock, we remove the node from CommonExitBlock's predecessors, invalidating the
[CodeExtractor] Fix iterator invalidation in findOrCreateBlockForHoisting.
Summary: By replacing branches to CommonExitBlock, we remove the node from CommonExitBlock's predecessors, invalidating the iterator. The problem is exposed when the common exit block has multiple predecessors and needs to sink lifetime info. The modification in the test case trigger the issue.
Reviewers: davidxl, davide, wmi
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39112
llvm-svn: 317084
show more ...
|
|
Revision tags: llvmorg-5.0.1-rc1 |
|
| #
286d5897 |
| 11-Oct-2017 |
Eugene Zelenko <[email protected]> |
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 315516
|
| #
cbe9fae9 |
| 06-Oct-2017 |
Jakub Kuderski <[email protected]> |
[CodeExtractor] Fix multiple bugs under certain shape of extracted region
Summary: If the extracted region has multiple exported data flows toward the same BB which is not included in the region, co
[CodeExtractor] Fix multiple bugs under certain shape of extracted region
Summary: If the extracted region has multiple exported data flows toward the same BB which is not included in the region, correct resotre instructions and PHI nodes won't be generated inside the exitStub. The solution is simply put the restore instructions right after the definition of output values instead of putting in exitStub. Unittest for this bug is included.
Author: myhsu
Reviewers: chandlerc, davide, lattner, silvas, davidxl, wmi, kuhar
Subscribers: dberlin, kuhar, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D37902
llvm-svn: 315041
show more ...
|
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
| #
e3f7dda1 |
| 02-Jul-2017 |
Davide Italiano <[email protected]> |
[CodeExtractor] Remove unneded and commented out debugging stmts.
llvm-svn: 306966
|
| #
7bc405aa |
| 27-Jun-2017 |
Serge Guelton <[email protected]> |
[CodeExtractor] Prevent extraction of block involving blockaddress
BlockAddress are only valid within their function context, which does not interact well with CodeExtractor. Detect this case and pr
[CodeExtractor] Prevent extraction of block involving blockaddress
BlockAddress are only valid within their function context, which does not interact well with CodeExtractor. Detect this case and prevent it.
Differential Revision: https://reviews.llvm.org/D33839
llvm-svn: 306448
show more ...
|
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
| #
7ed6cd32 |
| 11-Jun-2017 |
Xinliang David Li <[email protected]> |
[PartialInlining] Support shrinkwrap life_range markers
Differential Revision: http://reviews.llvm.org/D33847
llvm-svn: 305170
|
|
Revision tags: llvmorg-4.0.1-rc2 |
|
| #
74480ada |
| 30-May-2017 |
Xinliang David Li <[email protected]> |
[PartialInlining] Shrinkwrap allocas with live range contained in outline region.
Differential Revision: http://reviews.llvm.org/D33618
llvm-svn: 304245
|
|
Revision tags: llvmorg-4.0.1-rc1 |
|
| #
f12a0faf |
| 25-Apr-2017 |
Xinliang David Li <[email protected]> |
[CodeExtractor]: Fixup use refs of the old phi.
Differential Revision: http://reviews.llvm.org/D32468
llvm-svn: 301291
|
| #
fa15de34 |
| 21-Apr-2017 |
Davide Italiano <[email protected]> |
[PartialInliner] Fix crash when inlining functions with unreachable blocks.
CodeExtractor looks up the dominator node corresponding to return blocks when splitting them. If one of these blocks is un
[PartialInliner] Fix crash when inlining functions with unreachable blocks.
CodeExtractor looks up the dominator node corresponding to return blocks when splitting them. If one of these blocks is unreachable, there's no node in the Dom and CodeExtractor crashes because it doesn't check for domtree node validity. In theory, we could add just a check for skipping null DTNodes in `splitReturnBlock` but the fix I propose here is slightly different. To the best of my knowledge, unreachable blocks are irrelevant for the algorithm, therefore we can just skip them when building the candidate set in the constructor.
Differential Revision: https://reviews.llvm.org/D32335
llvm-svn: 300946
show more ...
|
| #
059574c5 |
| 21-Apr-2017 |
Davide Italiano <[email protected]> |
[CodeExtractor] Remove an unneeded level of indirection. NFCI.
llvm-svn: 300931
|
| #
99e3ca15 |
| 20-Apr-2017 |
Xinliang David Li <[email protected]> |
Use basicblock split block utility function
Instead of calling BasicBlock::SplitBasicBlock directly in CodeExtractor.
Differential Revision: https://reviews.llvm.org/D32308
llvm-svn: 300899
|
| #
b965121b |
| 20-Apr-2017 |
Davide Italiano <[email protected]> |
[CodeExtractor] Remove a bunch of unneeded constructors.
Differential Revision: https://reviews.llvm.org/D32305
llvm-svn: 300869
|
| #
eb9dd5b8 |
| 10-Apr-2017 |
Reid Kleckner <[email protected]> |
Reland "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"
This re-lands r299875.
I introduced a bug in Clang code responsible for replacing K&R, no prototype declarations wit
Reland "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"
This re-lands r299875.
I introduced a bug in Clang code responsible for replacing K&R, no prototype declarations with a real function definition with a prototype. The bug was here:
// Collect any return attributes from the call. - if (oldAttrs.hasAttributes(llvm::AttributeList::ReturnIndex)) - newAttrs.push_back(llvm::AttributeList::get(newFn->getContext(), - oldAttrs.getRetAttributes())); + newAttrs.push_back(oldAttrs.getRetAttributes());
Previously getRetAttributes() carried AttributeList::ReturnIndex in its AttributeList. Now that we return the AttributeSetNode* directly, it no longer carries that index, and we call this overload with a single node: AttributeList::get(LLVMContext&, ArrayRef<AttributeSetNode*>)
That aborted with an assertion on x86_32 targets. I added an explicit triple to the test and added CHECKs to help find issues like this in the future sooner.
llvm-svn: 299899
show more ...
|
| #
3c1fc768 |
| 10-Apr-2017 |
Matt Arsenault <[email protected]> |
Allow DataLayout to specify addrspace for allocas.
LLVM makes several assumptions about address space 0. However, alloca is presently constrained to always return this address space. There's no real
Allow DataLayout to specify addrspace for allocas.
LLVM makes several assumptions about address space 0. However, alloca is presently constrained to always return this address space. There's no real way to avoid using alloca, so without this there is no way to opt out of these assumptions.
The problematic assumptions include: - That the pointer size used for the stack is the same size as the code size pointer, which is also the maximum sized pointer.
- That 0 is an invalid, non-dereferencable pointer value.
These are problems for AMDGPU because alloca is used to implement the private address space, which uses a 32-bit index as the pointer value. Other pointers are 64-bit and behave more like LLVM's notion of generic address space. By changing the address space used for allocas, we can change our generic pointer type to be LLVM's generic pointer type which does have similar properties.
llvm-svn: 299888
show more ...
|
| #
211b1f32 |
| 10-Apr-2017 |
Reid Kleckner <[email protected]> |
Revert "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"
This reverts r299875. A Linux bot came back with a test failure: http://bb.pgr.jp/builders/test-clang-i686-linux-RA/b
Revert "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"
This reverts r299875. A Linux bot came back with a test failure: http://bb.pgr.jp/builders/test-clang-i686-linux-RA/builds/741/steps/test_clang/logs/Clang%20%3A%3A%20CodeGen__2006-05-19-SingleEltReturn.c
llvm-svn: 299878
show more ...
|
| #
324c99de |
| 10-Apr-2017 |
Reid Kleckner <[email protected]> |
[IR] Make AttributeSetNode public, avoid temporary AttributeList copies
Summary: AttributeList::get(Fn|Ret|Param)Attributes no longer creates a temporary AttributeList just to hide the AttributeSetN
[IR] Make AttributeSetNode public, avoid temporary AttributeList copies
Summary: AttributeList::get(Fn|Ret|Param)Attributes no longer creates a temporary AttributeList just to hide the AttributeSetNode type.
I've also added a factory method to create AttributeLists from a parallel array of AttributeSetNodes. I think this simplifies construction of AttributeLists when rewriting function prototypes. Previously we would test if a particular index had attributes, and conditionally add a temporary attribute list to a vector. Now the attribute set vector is parallel to the argument vector already that these passes already construct.
My long term vision is to wrap AttributeSetNode* inside an AttributeSet type that holds the enum attributes, but that will come in a follow up change.
I haven't done any performance measurements for this change because profiling hasn't shown that any of the affected code is hot.
Reviewers: pete, chandlerc, sanjoy, hfinkel
Reviewed By: pete
Subscribers: jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D31198
llvm-svn: 299875
show more ...
|
| #
b518054b |
| 21-Mar-2017 |
Reid Kleckner <[email protected]> |
Rename AttributeSet to AttributeList
Summary: This class is a list of AttributeSetNodes corresponding the function prototype of a call or function declaration. This class used to be called ParamAttr
Rename AttributeSet to AttributeList
Summary: This class is a list of AttributeSetNodes corresponding the function prototype of a call or function declaration. This class used to be called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is typically accessed by parameter and return value index, so "AttributeList" seems like a more intuitive name.
Rename AttributeSetImpl to AttributeListImpl to follow suit.
It's useful to rename this class so that we can rename AttributeSetNode to AttributeSet later. AttributeSet is the set of attributes that apply to a single function, argument, or return value.
Reviewers: sanjoy, javed.absar, chandlerc, pete
Reviewed By: pete
Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits
Differential Revision: https://reviews.llvm.org/D31102
llvm-svn: 298393
show more ...
|
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
| #
9011aca5 |
| 22-Feb-2017 |
Sean Silva <[email protected]> |
Use const-ref in range-loop for to avoid copying pairs of std::string
No reason to create temporaries.
Differential Revision: https://reviews.llvm.org/D29871
Patch by sergio.martins!
llvm-svn: 29
Use const-ref in range-loop for to avoid copying pairs of std::string
No reason to create temporaries.
Differential Revision: https://reviews.llvm.org/D29871
Patch by sergio.martins!
llvm-svn: 295807
show more ...
|
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2 |
|
| #
f801575f |
| 02-Aug-2016 |
Sean Silva <[email protected]> |
CodeExtractor : Add ability to preserve profile data.
Added ability to estimate the entry count of the extracted function and the branch probabilities of the exit branches.
Patch by River Riddle!
CodeExtractor : Add ability to preserve profile data.
Added ability to estimate the entry count of the extracted function and the branch probabilities of the exit branches.
Patch by River Riddle!
Differential Revision: https://reviews.llvm.org/D22744
llvm-svn: 277411
show more ...
|
| #
423c7149 |
| 01-Aug-2016 |
Sean Silva <[email protected]> |
Revert r277313 and r277314.
They seem to trigger an LSan failure: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/15140/steps/check-llvm%20asan/logs/stdio
Revert "Add the tests
Revert r277313 and r277314.
They seem to trigger an LSan failure: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/15140/steps/check-llvm%20asan/logs/stdio
Revert "Add the tests for r277313"
This reverts commit r277314.
Revert "CodeExtractor : Add ability to preserve profile data."
This reverts commit r277313.
llvm-svn: 277317
show more ...
|
| #
a0a802ab |
| 01-Aug-2016 |
Sean Silva <[email protected]> |
Fix - CodeExtractor : Inherit Target Dependent Attributes from the parent function.
When extracting a set of blocks make sure to inherit all of the target dependent attributes to make sure that the
Fix - CodeExtractor : Inherit Target Dependent Attributes from the parent function.
When extracting a set of blocks make sure to inherit all of the target dependent attributes to make sure that the function will be valid for lowering. One example is the "target-features" attribute for x86, if the extracted region has functionality that relies on a specific feature it will fail to be lowered. This also allows for extracted functions to be valid for inlining, at least back into the parent function, as the target attributes are tested when inlining for compatibility.
Patch by River Riddle!
Differential Revision: https://reviews.llvm.org/D22713
llvm-svn: 277315
show more ...
|
| #
62089243 |
| 01-Aug-2016 |
Sean Silva <[email protected]> |
CodeExtractor : Add ability to preserve profile data.
Added ability to estimate the entry count of the extracted function and the branch probabilities of the exit branches.
Patch by River Riddle!
CodeExtractor : Add ability to preserve profile data.
Added ability to estimate the entry count of the extracted function and the branch probabilities of the exit branches.
Patch by River Riddle!
Differential Revision: https://reviews.llvm.org/D22744
llvm-svn: 277313
show more ...
|