#
140a8569 |
| 13-Mar-2017 |
Adrian Prantl <aprantl@apple.com> |
API gardening: Rename FindAllocaDbgValue to findDbgValue (NFC) and use have it use SmallVectorImpl.
There is nothing specific about allocas in this function.
llvm-svn: 297643
|
#
e3e69e16 |
| 10-Mar-2017 |
Daniel Berlin <dberlin@dberlin.org> |
NewGVN: Rewrite DCE during elimination so we do it as well as old GVN did.
llvm-svn: 297428
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2 |
|
#
d21529fa |
| 23-Jan-2017 |
David L. Jones <dlj@google.com> |
[Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC)
Summary: The LibFunc::Func enum holds enumerators named for libc functions. Unfortunately, there are real situations, including li
[Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC)
Summary: The LibFunc::Func enum holds enumerators named for libc functions. Unfortunately, there are real situations, including libc implementations, where function names are actually macros (musl uses "#define fopen64 fopen", for example; any other transitively visible macro would have similar effects).
Strictly speaking, a conforming C++ Standard Library should provide any such macros as functions instead (via <cstdio>). However, there are some "library" functions which are not part of the standard, and thus not subject to this rule (fopen64, for example). So, in order to be both portable and consistent, the enum should not use the bare function names.
The old enum naming used a namespace LibFunc and an enum Func, with bare enumerators. This patch changes LibFunc to be an enum with enumerators prefixed with "LibFFunc_". (Unfortunately, a scoped enum is not sufficient to override macros.)
There are additional changes required in clang.
Reviewers: rsmith
Subscribers: mehdi_amini, mzolotukhin, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D28476
llvm-svn: 292848
show more ...
|
Revision tags: llvmorg-4.0.0-rc1 |
|
#
49797ca6 |
| 22-Dec-2016 |
Adrian Prantl <aprantl@apple.com> |
Refactor the DIExpression fragment query interface (NFC) ... so it becomes available to DIExpressionCursor.
llvm-svn: 290322
|
#
aec2fa35 |
| 19-Dec-2016 |
Daniel Jasper <djasper@google.com> |
Revert @llvm.assume with operator bundles (r289755-r289757)
This creates non-linear behavior in the inliner (see more details in r289755's commit thread).
llvm-svn: 290086
|
#
3ca4a6bc |
| 15-Dec-2016 |
Hal Finkel <hfinkel@anl.gov> |
Remove the AssumptionCache
After r289755, the AssumptionCache is no longer needed. Variables affected by assumptions are now found by using the new operand-bundle-based scheme. This new scheme is mo
Remove the AssumptionCache
After r289755, the AssumptionCache is no longer needed. Variables affected by assumptions are now found by using the new operand-bundle-based scheme. This new scheme is more computationally efficient, and also we need much less code...
llvm-svn: 289756
show more ...
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3 |
|
#
941fa758 |
| 05-Dec-2016 |
Adrian Prantl <aprantl@apple.com> |
[DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation so we can stop using DW_OP_bit_piece with the wrong semantics.
The entire back story can be found here: http://lists.llvm.org/piper
[DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation so we can stop using DW_OP_bit_piece with the wrong semantics.
The entire back story can be found here: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161114/405934.html
The gist is that in LLVM we've been misinterpreting DW_OP_bit_piece's offset field to mean the offset into the source variable rather than the offset into the location at the top the DWARF expression stack. In order to be able to fix this in a subsequent patch, this patch introduces a dedicated DW_OP_LLVM_fragment operation with the semantics that we used to apply to DW_OP_bit_piece, which is what we actually need while inside of LLVM. This patch is complete with a bitcode upgrade for expressions using the old format. It does not yet fix the DWARF backend to use DW_OP_bit_piece correctly.
Implementation note: We discussed several options for implementing this, including reserving a dedicated field in DIExpression for the fragment size and offset, but using an custom operator at the end of the expression works just fine and is more efficient because we then only pay for it when we need it.
Differential Revision: https://reviews.llvm.org/D27361 rdar://problem/29335809
llvm-svn: 288683
show more ...
|
Revision tags: llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
5020c997 |
| 18-Nov-2016 |
Michael Zolotukhin <mzolotukhin@apple.com> |
[LoopSimplify] Preserve LCSSA when removing edges from unreachable blocks.
This fixes PR30454.
llvm-svn: 287379
|
#
77382be5 |
| 18-Nov-2016 |
Florian Hahn <florian.hahn@arm.com> |
[simplifycfg][loop-simplify] Preserve loop metadata in 2 transformations.
insertUniqueBackedgeBlock in lib/Transforms/Utils/LoopSimplify.cpp now propagates existing llvm.loop metadata to newly the a
[simplifycfg][loop-simplify] Preserve loop metadata in 2 transformations.
insertUniqueBackedgeBlock in lib/Transforms/Utils/LoopSimplify.cpp now propagates existing llvm.loop metadata to newly the added backedge.
llvm::TryToSimplifyUncondBranchFromEmptyBlock in lib/Transforms/Utils/Local.cpp now propagates existing llvm.loop metadata to the branch instructions in the predecessor blocks of the empty block that is removed.
Differential Revision: https://reviews.llvm.org/D26495
llvm-svn: 287341
show more ...
|
#
ddfdba3b |
| 14-Nov-2016 |
Kuba Brecka <kuba.brecka@gmail.com> |
[tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part
This adds support for TSan C++ exception handling, where we need to add extra calls to __tsan_func
[tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part
This adds support for TSan C++ exception handling, where we need to add extra calls to __tsan_func_exit when a function is exitted via exception mechanisms. Otherwise the shadow stack gets corrupted (leaked). This patch moves and enhances the existing implementation of EscapeEnumerator that finds all possible function exit points, and adds extra EH cleanup blocks where needed.
Differential Revision: https://reviews.llvm.org/D26177
llvm-svn: 286893
show more ...
|
#
b6befc3b |
| 02-Nov-2016 |
Eli Friedman <efriedma@codeaurora.org> |
DCE math library calls with a constant operand.
On platforms which use -fmath-errno, math libcalls without any uses require some extra checks to figure out if they are actually dead.
Fixes https://
DCE math library calls with a constant operand.
On platforms which use -fmath-errno, math libcalls without any uses require some extra checks to figure out if they are actually dead.
Fixes https://llvm.org/bugs/show_bug.cgi?id=30464 .
Differential Revision: https://reviews.llvm.org/D25970
llvm-svn: 285857
show more ...
|
#
6481822e |
| 27-Sep-2016 |
Reid Kleckner <rnk@google.com> |
[DebugInfo] Add comments to phi dbg.value tracking code, NFC
LLVM developers might be surprised to learn that there are blocks without valid insertion points (catchswitch), so it seems worth calling
[DebugInfo] Add comments to phi dbg.value tracking code, NFC
LLVM developers might be surprised to learn that there are blocks without valid insertion points (catchswitch), so it seems worth calling that out explicitly. Also add a FIXME about what we should really be doing if we ever need to make optimized Windows EH code debuggable.
While I'm here, make auto usage more consistent with LLVM standards and avoid an unecessary call to insertBefore.
llvm-svn: 282521
show more ...
|
#
ba159897 |
| 22-Sep-2016 |
Keith Walker <kwalker@arm.com> |
Reapplying r281895 (and follow-up r281964) after fixing pr30468.
The additional fix is:
When adding debug information to a lowered phi node in mem2reg check that we have a valid insertion point af
Reapplying r281895 (and follow-up r281964) after fixing pr30468.
The additional fix is:
When adding debug information to a lowered phi node in mem2reg check that we have a valid insertion point after the phi for adding the debug information.
This change addresses the issue in pr30468 where a lowered phi was added before a catchswitch and no debug information should be added after the phi in this case.
Differential Revision: https://reviews.llvm.org/D24797
llvm-svn: 282155
show more ...
|
#
1049085c |
| 21-Sep-2016 |
Hans Wennborg <hans@hanshq.net> |
Revert r281895 "Add @llvm.dbg.value entries for the phi node created by -mem2reg"
(And follow-up r281964.)
It caused PR30468.
llvm-svn: 282077
|
#
22b5dbc8 |
| 20-Sep-2016 |
Keith Walker <kwalker@arm.com> |
Make llvm::ConvertDebugDeclareToDebugValue() be a void function (NFC)
The routines llvm::ConvertDebugDeclareToDebugValue() always returned a true value which was never checked at the call site; chan
Make llvm::ConvertDebugDeclareToDebugValue() be a void function (NFC)
The routines llvm::ConvertDebugDeclareToDebugValue() always returned a true value which was never checked at the call site; change the function return type to void.
This NFC cleanup was approved in the review https://reviews.llvm.org/D23715
llvm-svn: 281964
show more ...
|
#
c9412523 |
| 19-Sep-2016 |
Keith Walker <kwalker@arm.com> |
Add @llvm.dbg.value entries for the phi node created by -mem2reg
When phi nodes are created in the -mem2reg phase, the @llvm.dbg.declare entries are converted to @llvm.dbg.value entries at the place
Add @llvm.dbg.value entries for the phi node created by -mem2reg
When phi nodes are created in the -mem2reg phase, the @llvm.dbg.declare entries are converted to @llvm.dbg.value entries at the place where the store instructions existed. However no entry is created to describe the resulting value of the phi node.
The effect of this is especially noticeable in for loops which have a constant for the intial value; the loop control variable's location would be described as the intial constant value in the loop body once the -mem2reg optimization phase was run.
This change adds the creation of the @llvm.dbg.value entries to describe variables whose location is the result of a phi node created in -mem2reg.
Also when the phi node is finally lowered to a machine instruction it is important that the lowered "load" instruction is placed before the associated DEBUG_VALUE entry describing the value loaded.
Differential Revision: https://reviews.llvm.org/D23715
llvm-svn: 281895
show more ...
|
#
30bccade |
| 13-Sep-2016 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Fix misleading comment for getOrEnforceKnownAlignment
It does not return 0 to indicate failure, and returns the known alignment.
llvm-svn: 281350
|
#
db381077 |
| 08-Sep-2016 |
Dehao Chen <dehao@google.com> |
revert r280427
Refactor replaceDominatedUsesWith to have a flag to control whether to replace uses in BB itself.
Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWi
revert r280427
Refactor replaceDominatedUsesWith to have a flag to control whether to replace uses in BB itself.
Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWith to update after sinking. llvm-svn: 280949
show more ...
|
#
ddd0c125 |
| 01-Sep-2016 |
Dehao Chen <dehao@google.com> |
Refactor replaceDominatedUsesWith to have a flag to control whether to replace uses in BB itself.
Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWith to update aft
Refactor replaceDominatedUsesWith to have a flag to control whether to replace uses in BB itself.
Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWith to update after sinking.
Reviewers: chandlerc, davidxl, danielcdh
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D24170
llvm-svn: 280427
show more ...
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2 |
|
#
02419a98 |
| 08-Aug-2016 |
Eli Friedman <eli.friedman@gmail.com> |
[JumpThreading] Fix handling of aliasing metadata.
Summary: The correctness fix here is that when we CSE a load with another load, we need to combine the metadata on the two loads. This matches the
[JumpThreading] Fix handling of aliasing metadata.
Summary: The correctness fix here is that when we CSE a load with another load, we need to combine the metadata on the two loads. This matches the behavior of other passes, like instcombine and GVN.
There's also a minor optimization improvement here: for load PRE, the aliasing metadata on the inserted load should be the same as the metadata on the original load. Not sure why the old code was throwing it away.
Issue found by inspection.
Differential Revision: http://reviews.llvm.org/D21460
llvm-svn: 277977
show more ...
|
#
b7d3311c |
| 06-Aug-2016 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move helpers into anonymous namespaces. NFC.
llvm-svn: 277916
|
Revision tags: llvmorg-3.9.0-rc1 |
|
#
d240a889 |
| 28-Jul-2016 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
[sanitizer] Simplify and future-proof maybeMarkSanitizerLibraryCallNoBuiltin().
Sanitizers set nobuiltin attribute on certain library functions to avoid a situation where such function is neither in
[sanitizer] Simplify and future-proof maybeMarkSanitizerLibraryCallNoBuiltin().
Sanitizers set nobuiltin attribute on certain library functions to avoid a situation where such function is neither instrumented nor intercepted.
At the moment the list of interesting functions is hardcoded. This change replaces it with logic based on TargetLibraryInfo::hasOptimizedCodegen and the presense of readnone function attribute (sanitizers are generally interested in memory behavior of library functions).
This is expected to be a no-op change: the new logic matches exactly the same set of functions.
r276771 (currently reverted) added mempcpy() to the list, breaking MSan tests. With this change, r276771 can be safely re-landed.
llvm-svn: 277086
show more ...
|
#
6f014d37 |
| 25-Jul-2016 |
David Majnemer <david.majnemer@gmail.com> |
[Utils] Simplify combineMetadata
Use a range-based for loop, no functional change is intended.
llvm-svn: 276600
|
#
9f506259 |
| 25-Jun-2016 |
David Majnemer <david.majnemer@gmail.com> |
Just a small cleanup
No functional change is intended
llvm-svn: 273780
|
#
e14e7bc4 |
| 25-Jun-2016 |
David Majnemer <david.majnemer@gmail.com> |
Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"
This reverts commit r273778, it seems to break UBSan :/
llvm-svn: 273779
|