#
c7fc81e6 |
| 30-Dec-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use phi ranges to simplify code. No functionality change intended.
llvm-svn: 321585
|
#
042fed54 |
| 15-Dec-2017 |
Matthias Braun <matze@braunis.de> |
Fix unused variable in non-assert builds
llvm-svn: 320885
|
#
f1caa283 |
| 15-Dec-2017 |
Matthias Braun <matze@braunis.de> |
MachineFunction: Return reference from getFunction(); NFC
The Function can never be nullptr so we can return a reference.
llvm-svn: 320884
|
#
c133d8a5 |
| 14-Dec-2017 |
Adrian Prantl <aprantl@apple.com> |
EmitFuncArgumentDbgValue: Prefer stack slots over registers for stack arguments
While investigating LLVM PR22316 (http://llvm.org/bugs/show_bug.cgi?id=22316) I started wondering if it were not alway
EmitFuncArgumentDbgValue: Prefer stack slots over registers for stack arguments
While investigating LLVM PR22316 (http://llvm.org/bugs/show_bug.cgi?id=22316) I started wondering if it were not always preferable to emit the initial DBG_VALUEs for stack arguments as FI locations instead of describing the first register they get copied into. The advantage of doing this is that the arguments will be available as soon as the stack is setup. As illustrated by the testcase in the PR, the first copy of the FI into a register may be sunk by MachineSink.cpp into a later basic block. By describing the argument on the stack, we nicely circumvent this problem.
<rdar://problem/19583723>
Differential Revision: https://reviews.llvm.org/D41135
llvm-svn: 320758
show more ...
|
#
7d7adf4f |
| 14-Dec-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
TLI: Allow using PSV for intrinsic mem operands
llvm-svn: 320756
|
#
260fe3ec |
| 14-Dec-2017 |
Zachary Turner <zturner@google.com> |
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
Most of the -Wsign-compare warnings are due to the fact that enums are signed by default in the MS ABI, while the tautological c
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
Most of the -Wsign-compare warnings are due to the fact that enums are signed by default in the MS ABI, while the tautological comparison warnings trigger on x86 builds where sizeof(size_t) is 4 bytes, so N > numeric_limits<unsigned>::max() is always false.
Differential Revision: https://reviews.llvm.org/D41256
llvm-svn: 320750
show more ...
|
#
11171336 |
| 14-Dec-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
DAG: Expose all MMO flags in getTgtMemIntrinsic
Rather than adding more bits to express every MMO flag you could want, just directly use the MMO flags. Also fixes using a bunch of bool arguments to
DAG: Expose all MMO flags in getTgtMemIntrinsic
Rather than adding more bits to express every MMO flag you could want, just directly use the MMO flags. Also fixes using a bunch of bool arguments to getMemIntrinsicNode.
On AMDGPU, buffer and image intrinsics should always have MODereferencable set, but currently there is no way to do that directly during the initial intrinsic lowering.
llvm-svn: 320746
show more ...
|
#
80463fe6 |
| 09-Dec-2017 |
Dylan McKay <me@dylanmckay.io> |
Relax unaligned access assertion when type is byte aligned
Summary: This relaxes an assertion inside SelectionDAGBuilder which is overly restrictive on targets which have no concept of alignment (su
Relax unaligned access assertion when type is byte aligned
Summary: This relaxes an assertion inside SelectionDAGBuilder which is overly restrictive on targets which have no concept of alignment (such as AVR).
In these architectures, all types are aligned to 8-bits.
After this, LLVM will only assert that accesses are aligned on targets which actually require alignment.
This patch follows from a discussion on llvm-dev a few months ago http://llvm.1065342.n5.nabble.com/llvm-dev-Unaligned-atomic-load-store-td112815.html
Reviewers: bogner, nemanjai, joerg, efriedma
Reviewed By: efriedma
Subscribers: efriedma, cactus, llvm-commits
Differential Revision: https://reviews.llvm.org/D39946
llvm-svn: 320243
show more ...
|
#
5df9f087 |
| 05-Dec-2017 |
Hans Wennborg <hans@hanshq.net> |
Re-commit r319490 "XOR the frame pointer with the stack cookie when protecting the stack"
The patch originally broke Chromium (crbug.com/791714) due to its failing to specify that the new pseudo ins
Re-commit r319490 "XOR the frame pointer with the stack cookie when protecting the stack"
The patch originally broke Chromium (crbug.com/791714) due to its failing to specify that the new pseudo instructions clobber EFLAGS. This commit fixes that.
> Summary: This strengthens the guard and matches MSVC. > > Reviewers: hans, etienneb > > Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits > > Differential Revision: https://reviews.llvm.org/D40622
llvm-svn: 319824
show more ...
|
#
361d4392 |
| 04-Dec-2017 |
Hans Wennborg <hans@hanshq.net> |
Revert r319490 "XOR the frame pointer with the stack cookie when protecting the stack"
This broke the Chromium build (crbug.com/791714). Reverting while investigating.
> Summary: This strengthens t
Revert r319490 "XOR the frame pointer with the stack cookie when protecting the stack"
This broke the Chromium build (crbug.com/791714). Reverting while investigating.
> Summary: This strengthens the guard and matches MSVC. > > Reviewers: hans, etienneb > > Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits > > Differential Revision: https://reviews.llvm.org/D40622 > > git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319490 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-svn: 319706
show more ...
|
#
30e4608c |
| 03-Dec-2017 |
Yaxun Liu <Yaxun.Liu@amd.com> |
CodeGen: Fix SelectionDAGISel::LowerArguments for sret addr space
SelectionDAGISel::LowerArguments assumes sret addr space is 0, which is not true for amdgcn---amdgiz target.
This patch fixes that.
CodeGen: Fix SelectionDAGISel::LowerArguments for sret addr space
SelectionDAGISel::LowerArguments assumes sret addr space is 0, which is not true for amdgcn---amdgiz target.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D40255
llvm-svn: 319630
show more ...
|
#
8065f0b9 |
| 01-Dec-2017 |
Zachary Turner <zturner@google.com> |
Mark all library options as hidden.
These command line options are not intended for public use, and often don't even make sense in the context of a particular tool anyway. About 90% of them are alre
Mark all library options as hidden.
These command line options are not intended for public use, and often don't even make sense in the context of a particular tool anyway. About 90% of them are already hidden, but when people add new options they forget to hide them, so if you were to make a brand new tool today, link against one of LLVM's libraries, and run tool -help you would get a bunch of junk that doesn't make sense for the tool you're writing.
This patch hides these options. The real solution is to not have libraries defining command line options, but that's a much larger effort and not something I'm prepared to take on.
Differential Revision: https://reviews.llvm.org/D40674
llvm-svn: 319505
show more ...
|
#
ba4014e9 |
| 30-Nov-2017 |
Reid Kleckner <rnk@google.com> |
XOR the frame pointer with the stack cookie when protecting the stack
Summary: This strengthens the guard and matches MSVC.
Reviewers: hans, etienneb
Subscribers: hiraditya, JDevlieghere, vlad.tsy
XOR the frame pointer with the stack cookie when protecting the stack
Summary: This strengthens the guard and matches MSVC.
Reviewers: hans, etienneb
Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits
Differential Revision: https://reviews.llvm.org/D40622
llvm-svn: 319490
show more ...
|
#
b655fa9c |
| 29-Nov-2017 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
DAG: Add nuw when splitting loads and stores
The object can't straddle the address space wrap around, so I think it's OK to assume any offsets added to the base object pointer can't overflow. Simila
DAG: Add nuw when splitting loads and stores
The object can't straddle the address space wrap around, so I think it's OK to assume any offsets added to the base object pointer can't overflow. Similar logic already appears to be applied in SelectionDAGBuilder when lowering aggregate returns.
llvm-svn: 319272
show more ...
|
#
230b0a14 |
| 28-Nov-2017 |
Mandeep Singh Grang <mgrang@codeaurora.org> |
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
Summary: Recommitting this with the correct sorting predicate. The Low field of Clusters is a ConstantInt and cann
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
Summary: Recommitting this with the correct sorting predicate. The Low field of Clusters is a ConstantInt and cannot be directly compared. So we needed to invoke slt (signed less than) to compare correctly.
This fixes failures in the following tests uncovered by D39245:
LLVM :: CodeGen/ARM/ifcvt3.ll LLVM :: CodeGen/ARM/switch-minsize.ll LLVM :: CodeGen/X86/switch.ll LLVM :: CodeGen/X86/switch-bt.ll LLVM :: CodeGen/X86/switch-density.ll
Reviewers: hans, fhahn
Reviewed By: hans
Subscribers: aemerson, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D40541
llvm-svn: 319210
show more ...
|
#
f0ff20f1 |
| 28-Nov-2017 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
Use getStoreSize() in various places instead of 'BitSize >> 3'.
This is needed for cases when the memory access is not as big as the width of the data type. For instance, storing i1 (1 bit) would be
Use getStoreSize() in various places instead of 'BitSize >> 3'.
This is needed for cases when the memory access is not as big as the width of the data type. For instance, storing i1 (1 bit) would be done in a byte (8 bits).
Using 'BitSize >> 3' (or '/ 8') would e.g. give the memory access of an i1 a size of 0, which for instance makes alias analysis return NoAlias even when it shouldn't.
There are no tests as this was done as a follow-up to the bugfix for the case where this was discovered (r318824). This handles more similar cases.
Review: Björn Petterson https://reviews.llvm.org/D40339
llvm-svn: 319173
show more ...
|
#
f953e4b8 |
| 20-Nov-2017 |
Mandeep Singh Grang <mgrang@codeaurora.org> |
Revert "[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering"
This broke the bots. Reverting this until I can fix the failures.
This reverts commit 5a3db2856d12a3c4b4
Revert "[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering"
This broke the bots. Reverting this until I can fix the failures.
This reverts commit 5a3db2856d12a3c4b400f487d39f8f05989e79f0.
llvm-svn: 318686
show more ...
|
#
dc9de509 |
| 20-Nov-2017 |
Mandeep Singh Grang <mgrang@codeaurora.org> |
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
Summary: This fixes failures in the following tests uncovered by D39245: LLVM :: CodeGen/ARM/ifcvt3.ll
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
Summary: This fixes failures in the following tests uncovered by D39245: LLVM :: CodeGen/ARM/ifcvt3.ll LLVM :: CodeGen/ARM/switch-minsize.ll LLVM :: CodeGen/X86/switch.ll
Reviewers: hans, efriedma
Reviewed By: hans
Subscribers: fhahn, aemerson, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D39995
llvm-svn: 318680
show more ...
|
#
b3bde2ea |
| 17-Nov-2017 |
David Blaikie <dblaikie@gmail.com> |
Fix a bunch more layering of CodeGen headers that are in Target
All these headers already depend on CodeGen headers so moving them into CodeGen fixes the layering (since CodeGen depends on Target, n
Fix a bunch more layering of CodeGen headers that are in Target
All these headers already depend on CodeGen headers so moving them into CodeGen fixes the layering (since CodeGen depends on Target, not the other way around).
llvm-svn: 318490
show more ...
|
#
242374e2 |
| 16-Nov-2017 |
Craig Topper <craig.topper@intel.com> |
[X86] Don't remove sign extend of gather/scatter indices during SelectionDAGBuilder.
The sign extend might be from an i16 or i8 type and was inserted by InstCombine to match the pointer width. X86 g
[X86] Don't remove sign extend of gather/scatter indices during SelectionDAGBuilder.
The sign extend might be from an i16 or i8 type and was inserted by InstCombine to match the pointer width. X86 gather legalization isn't currently detecting this to reinsert a sign extend to make things legal.
It's a bit weird for the SelectionDAGBuilder to do this kind of optimization in the first place. With this removed we can at least lean on InstCombine somewhat to ensure the index is i32 or i64.
I'll work on trying to recover some of the test cases by removing sign extends in the backend when its safe to do so with an understanding of the current legalizer capabilities.
This should fix PR30690.
llvm-svn: 318466
show more ...
|
#
0844ff2a |
| 16-Nov-2017 |
Yaxun Liu <Yaxun.Liu@amd.com> |
Fix pointer EVT in SelectionDAGBuilder::visitAlloca
SelectionDAGBuilder::visitAlloca assumes alloca address space is 0, which is incorrect for triple amdgcn---amdgiz and causes isel failure.
This p
Fix pointer EVT in SelectionDAGBuilder::visitAlloca
SelectionDAGBuilder::visitAlloca assumes alloca address space is 0, which is incorrect for triple amdgcn---amdgiz and causes isel failure.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D40095
llvm-svn: 318392
show more ...
|
#
e4572c6b |
| 16-Nov-2017 |
Rong Xu <xur@google.com> |
[CodeGen] Fix the branch probability assertion in r318202
Due to integer precision, we might have numerator greater than denominator in the branch probability scaling. Add a check to prevent this fr
[CodeGen] Fix the branch probability assertion in r318202
Due to integer precision, we might have numerator greater than denominator in the branch probability scaling. Add a check to prevent this from happening.
llvm-svn: 318353
show more ...
|
#
3573d8da |
| 14-Nov-2017 |
Rong Xu <xur@google.com> |
[CodeGen] Peel off the dominant case in switch statement in lowering
This patch peels off the top case in switch statement into a branch if the probability exceeds a threshold. This will help the br
[CodeGen] Peel off the dominant case in switch statement in lowering
This patch peels off the top case in switch statement into a branch if the probability exceeds a threshold. This will help the branch prediction and avoids the extra compares when lowering into chain of branches.
Differential Revision: http://reviews.llvm.org/D39262
llvm-svn: 318202
show more ...
|
#
0b2f73fd |
| 14-Nov-2017 |
Yaxun Liu <Yaxun.Liu@amd.com> |
CodeGen: Fix TargetLowering::LowerCallTo for sret value type
TargetLowering::LowerCallTo assumes that sret value type corresponds to a pointer in default address space, which is incorrect, since sre
CodeGen: Fix TargetLowering::LowerCallTo for sret value type
TargetLowering::LowerCallTo assumes that sret value type corresponds to a pointer in default address space, which is incorrect, since sret value type should correspond to a pointer in alloca address space, which may not be the default address space. This causes assertion for amdgcn target in amdgiz environment.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D39996
llvm-svn: 318167
show more ...
|
#
bdb8db45 |
| 10-Nov-2017 |
Craig Topper <craig.topper@intel.com> |
[SelectionDAG] Make getUniformBase in SelectionDAGBuilder fail if any of the middle GEP indices are non-constant.
This is a fix for a bug in r317947. We were supposed to check that all the indices a
[SelectionDAG] Make getUniformBase in SelectionDAGBuilder fail if any of the middle GEP indices are non-constant.
This is a fix for a bug in r317947. We were supposed to check that all the indices are are constant 0, but instead we're only make sure that indices that are constant are 0. Non-constant indices are being ignored.
llvm-svn: 317950
show more ...
|