Revision tags: llvmorg-5.0.1-rc2 |
|
#
d9e71098 |
| 27-Nov-2017 |
Arnold Schwaighofer <aschwaighofer@apple.com> |
Inliner: Don't mark notail calls with the 'tail' attribute
enum TailCallKind { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2, TCK_NoTail = 3 };
TCK_NoTail is greater than TCK_Tai
Inliner: Don't mark notail calls with the 'tail' attribute
enum TailCallKind { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2, TCK_NoTail = 3 };
TCK_NoTail is greater than TCK_Tail so taking the min does not do the correct thing.
rdar://35639547
llvm-svn: 319075
show more ...
|
#
0e9dec67 |
| 13-Nov-2017 |
Florian Hahn <florian.hahn@arm.com> |
[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 ...
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
6cadde7f |
| 17-Oct-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 316034
|
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, llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
6bda14b3 |
| 06-Jun-2017 |
Chandler Carruth <chandlerc@gmail.com> |
Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line
Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days.
I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch.
This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files.
Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again).
llvm-svn: 304787
show more ...
|
Revision tags: llvmorg-4.0.1-rc2 |
|
#
525dcb61 |
| 22-May-2017 |
Teresa Johnson <tejohnson@google.com> |
Fix update VP metadata after inlining for instrumentation PGO
Summary: With instrumentation profiling, when updating the VP metadata after an inline, VP metadata on the inlined copy was inadvertantl
Fix update VP metadata after inlining for instrumentation PGO
Summary: With instrumentation profiling, when updating the VP metadata after an inline, VP metadata on the inlined copy was inadvertantly having all counts zeroed out. This was causing indirect calls from code inlined during the call step to be marked as cold in the ThinLTO summaries and not imported.
The CallerBFI needs to be passed down so that the CallSiteCount can be computed from the profile summary info. With Sample PGO this was working since the count is extracted from the branch weight metadata on the call being inlined (even before we stopped looking at metadata for non-sample PGO in r302844 this largely wasn't working for instrumentation PGO since only promoted indirect calls would be getting inlined and have the metadata).
Added an instrumentation PGO test and renamed the sample PGO test.
Reviewers: danielcdh, eraman
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D33389
llvm-svn: 303574
show more ...
|
#
f5f91600 |
| 09-May-2017 |
Easwaran Raman <eraman@google.com> |
[ProfileSummary] Make getProfileCount a non-static member function.
This change is required because the notion of count is different for sample profiling and getProfileCount will need to determine t
[ProfileSummary] Make getProfileCount a non-static member function.
This change is required because the notion of count is different for sample profiling and getProfileCount will need to determine the underlying profile type.
Differential revision: https://reviews.llvm.org/D33012
llvm-svn: 302597
show more ...
|
#
c10d0e5c |
| 09-May-2017 |
Adrian Prantl <aprantl@apple.com> |
Make it illegal for two Functions to point to the same DISubprogram
As recently discussed on llvm-dev [1], this patch makes it illegal for two Functions to point to the same DISubprogram and updates
Make it illegal for two Functions to point to the same DISubprogram
As recently discussed on llvm-dev [1], this patch makes it illegal for two Functions to point to the same DISubprogram and updates FunctionCloner to also clone the debug info of a function to conform to the new requirement. To simplify the implementation it also factors out the creation of inlineAt locations from the Inliner into a general-purpose utility in DILocation.
[1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html <rdar://problem/31926379>
Differential Revision: https://reviews.llvm.org/D32975
This reapplies r302469 with a fix for a bot failure (reparentDebugInfo now checks for the case the orig and new function are identical).
llvm-svn: 302576
show more ...
|
#
66fb0d97 |
| 09-May-2017 |
Hans Wennborg <hans@hanshq.net> |
Revert r302469 "Make it illegal for two Functions to point to the same DISubprogram"
This caused PR32977.
Original commit message:
> Make it illegal for two Functions to point to the same DISubpro
Revert r302469 "Make it illegal for two Functions to point to the same DISubprogram"
This caused PR32977.
Original commit message:
> Make it illegal for two Functions to point to the same DISubprogram > > As recently discussed on llvm-dev [1], this patch makes it illegal for > two Functions to point to the same DISubprogram and updates > FunctionCloner to also clone the debug info of a function to conform > to the new requirement. To simplify the implementation it also factors > out the creation of inlineAt locations from the Inliner into a > general-purpose utility in DILocation. > > [1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html > <rdar://problem/31926379> > > Differential Revision: https://reviews.llvm.org/D32975
llvm-svn: 302533
show more ...
|
#
200a5ef5 |
| 08-May-2017 |
Adrian Prantl <aprantl@apple.com> |
Make it illegal for two Functions to point to the same DISubprogram
As recently discussed on llvm-dev [1], this patch makes it illegal for two Functions to point to the same DISubprogram and updates
Make it illegal for two Functions to point to the same DISubprogram
As recently discussed on llvm-dev [1], this patch makes it illegal for two Functions to point to the same DISubprogram and updates FunctionCloner to also clone the debug info of a function to conform to the new requirement. To simplify the implementation it also factors out the creation of inlineAt locations from the Inliner into a general-purpose utility in DILocation.
[1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html <rdar://problem/31926379>
Differential Revision: https://reviews.llvm.org/D32975
llvm-svn: 302469
show more ...
|
#
859f8b54 |
| 28-Apr-2017 |
Reid Kleckner <rnk@google.com> |
Make getParamAlignment use argument numbers
The method is called "get *Param* Alignment", and is only used for return values exactly once, so it should take argument indices, not attribute indices.
Make getParamAlignment use argument numbers
The method is called "get *Param* Alignment", and is only used for return values exactly once, so it should take argument indices, not attribute indices.
Avoids confusing code like: IsSwiftError = CS->paramHasAttr(ArgIdx, Attribute::SwiftError); Alignment = CS->getParamAlignment(ArgIdx + 1);
Add getRetAlignment to handle the one case in Value.cpp that wants the return value alignment.
This is a potentially breaking change for out-of-tree backends that do their own call lowering.
llvm-svn: 301682
show more ...
|
#
4d0fe64a |
| 28-Apr-2017 |
Daniel Berlin <dberlin@dberlin.org> |
Kill off the old SimplifyInstruction API by converting remaining users.
llvm-svn: 301673
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
3c1fc768 |
| 10-Apr-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
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 ...
|
#
795dc946 |
| 20-Mar-2017 |
David Blaikie <dblaikie@gmail.com> |
Fix UB found by -Wtautological-undefined-compare
llvm-svn: 298279
|
#
e593049f |
| 20-Mar-2017 |
Dehao Chen <dehao@google.com> |
Updates branch_weights annotation for call instructions during inlining.
Summary: Inliner should update the branch_weights annotation to scale it to proper value.
Reviewers: davidxl, eraman
Review
Updates branch_weights annotation for call instructions during inlining.
Summary: Inliner should update the branch_weights annotation to scale it to proper value.
Reviewers: davidxl, eraman
Reviewed By: eraman
Subscribers: zzheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D30767
llvm-svn: 298270
show more ...
|
#
45707d4d |
| 16-Mar-2017 |
Reid Kleckner <rnk@google.com> |
Remove getArgumentList() in favor of arg_begin(), args(), etc
Users often call getArgumentList().size(), which is a linear way to get the number of function arguments. arg_size(), on the other hand,
Remove getArgumentList() in favor of arg_begin(), args(), etc
Users often call getArgumentList().size(), which is a linear way to get the number of function arguments. arg_size(), on the other hand, is constant time.
In general, the fact that arguments are stored in an iplist is an implementation detail, so I've removed it from the Function interface and moved all other users to the argument container APIs (arg_begin(), arg_end(), args(), arg_size()).
Reviewed By: chandlerc
Differential Revision: https://reviews.llvm.org/D31052
llvm-svn: 298010
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4 |
|
#
d4056501 |
| 07-Mar-2017 |
Adrian Prantl <aprantl@apple.com> |
Revert "Strip debug info when inlining into a nodebug function."
This reverts commit r296488.
As noted by David Blaikie on llvm-commits, I overlooked the case of a debug function being inlined into
Revert "Strip debug info when inlining into a nodebug function."
This reverts commit r296488.
As noted by David Blaikie on llvm-commits, I overlooked the case of a debug function being inlined into a nodebug function being inlined into a debug function.
llvm-svn: 297163
show more ...
|
Revision tags: llvmorg-4.0.0-rc3 |
|
#
80d0c934 |
| 28-Feb-2017 |
Adrian Prantl <aprantl@apple.com> |
Strip debug info when inlining into a nodebug function.
The LLVM backend cannot produce any debug info for an llvm::Function without a DISubprogram attachment. When inlining a debug-info-carrying fu
Strip debug info when inlining into a nodebug function.
The LLVM backend cannot produce any debug info for an llvm::Function without a DISubprogram attachment. When inlining a debug-info-carrying function into a nodebug function, there is therefore no reason to keep any debug info intrinsic calls or debug locations on the instructions.
This fixes a problem discovered in PR32042.
rdar://problem/30679307
llvm-svn: 296488
show more ...
|
#
2d5841fa |
| 27-Feb-2017 |
Hans Wennborg <hans@hanshq.net> |
Revert r296366 "[InlineFunction] add nonnull assumptions based on argument attributes"
It causes miscompiles e.g. during self-host of Clang (PR32082).
llvm-svn: 296398
|
#
40975e05 |
| 27-Feb-2017 |
Sanjay Patel <spatel@rotateright.com> |
[InlineFunction] add nonnull assumptions based on argument attributes
This was suggested in D27855: have the inliner add assumptions, so we don't lose nonnull info provided by argument attributes.
[InlineFunction] add nonnull assumptions based on argument attributes
This was suggested in D27855: have the inliner add assumptions, so we don't lose nonnull info provided by argument attributes.
This still doesn't solve PR28430 (dyn_cast), but this gets us closer.
https://reviews.llvm.org/D29999
llvm-svn: 296366
show more ...
|
#
288f075f |
| 15-Feb-2017 |
Sanjay Patel <spatel@rotateright.com> |
[InlineFunction] use getFunction(); NFC
llvm-svn: 295185
|
#
32d753ca |
| 15-Feb-2017 |
Sanjay Patel <spatel@rotateright.com> |
[InlineFunction] use getCaller(); NFCI
llvm-svn: 295181
|
#
ada717e2 |
| 15-Feb-2017 |
Sanjay Patel <spatel@rotateright.com> |
[InlineFunction] use range-for loop; NFCI
llvm-svn: 295179
|
#
5a12f236 |
| 14-Feb-2017 |
Easwaran Raman <eraman@google.com> |
Fix a bug in caller's BFI update code after inlining.
Multiple blocks in the callee can be mapped to a single cloned block since we prune the callee as we clone it. The existing code iterates over t
Fix a bug in caller's BFI update code after inlining.
Multiple blocks in the callee can be mapped to a single cloned block since we prune the callee as we clone it. The existing code iterates over the value map and clones the block frequency (and eventually scales the frequencies of the cloned blocks). Value map's iteration is not deterministic and so the cloned block might get the frequency of any of the original blocks. The fix is to set the max of the original frequencies to the cloned block. The first block in the sequence must have this max frequency and, in the call context, subsequent blocks must have its frequency.
Differential Revision: https://reviews.llvm.org/D29696
llvm-svn: 295115
show more ...
|
Revision tags: llvmorg-4.0.0-rc2 |
|
#
12585b01 |
| 20-Jan-2017 |
Easwaran Raman <eraman@google.com> |
Improve PGO support for the new inliner
This adds the following to the new PM based inliner in PGO mode:
* Use block frequency analysis to derive callsite's profile count and use that to adjust thr
Improve PGO support for the new inliner
This adds the following to the new PM based inliner in PGO mode:
* Use block frequency analysis to derive callsite's profile count and use that to adjust thresholds of hot and cold callsites.
* Incrementally update the BFI of the caller after a callee gets inlined into it. This incremental update is only within an invocation of the run method - BFI is not preserved across calls to run. Update the function entry count of the callee after inlining it into a caller.
* I've tuned the thresholds for the hot and cold callsites using a hacked up version of the old inliner that explicitly computes BFI on a set of internal benchmarks and spec. Once the new PM based pipeline stabilizes (IIRC Chandler mentioned there are known issues) I'll benchmark this again and adjust the thresholds if required. Inliner PGO support.
Differential revision: https://reviews.llvm.org/D28331
llvm-svn: 292666
show more ...
|
Revision tags: llvmorg-4.0.0-rc1 |
|
#
65d533ca |
| 02-Jan-2017 |
Sanjay Patel <spatel@rotateright.com> |
fix typo; NFC
llvm-svn: 290827
|