| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 211933
|
|
|
|
| |
llvm-svn: 211932
|
|
|
|
| |
llvm-svn: 211931
|
|
|
|
| |
llvm-svn: 211930
|
|
|
|
| |
llvm-svn: 211926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a follow-up to r210375 which canonicalizes addrspacecast
instructions, this patch canonicalizes addrspacecast constant
expressions.
Given clang uses ConstantExpr::getAddrSpaceCast to emit addrspacecast
cosntant expressions, this patch is also a step towards having the
frontend emit canonicalized addrspacecasts.
Piggyback a minor refactor in InstCombineCasts.cpp
Update three affected tests in addrspacecast-alias.ll,
access-non-generic.ll and constant-fold-gep.ll and added one new test in
constant-fold-address-space-pointer.ll
llvm-svn: 211004
|
|
|
|
|
|
| |
We can just split targets_to_build in one place and make it immutable.
llvm-svn: 210496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Alias with unnamed_addr were in a strange state. It is stored in GlobalValue,
the language reference talks about "unnamed_addr aliases" but the verifier
was rejecting them.
It seems natural to allow unnamed_addr in aliases:
* It is a property of how it is accessed, not of the data itself.
* It is perfectly possible to write code that depends on the address
of an alias.
This patch then makes unname_addr legal for aliases. One side effect is that
the syntax changes for a corner case: In globals, unnamed_addr is now printed
before the address space.
llvm-svn: 210302
|
|
|
|
|
|
|
|
| |
Use volatile store to protect the generated PTX from DCE.
Patch by Jingyue Wu.
llvm-svn: 206763
|
|
|
|
|
|
| |
This commit adds intrinsics and codegen support for the surface read/write and texture read instructions that take an explicit sampler parameter. Codegen operates on image handles at the PTX level, but falls back to direct replacement of handles with kernel arguments if image handles are not enabled. Note that image handles are explicitly disabled for all target architectures in this change (to be enabled later).
llvm-svn: 205907
|
|
|
|
|
|
| |
including emitting generic() when casting to address space 0.
llvm-svn: 205906
|
|
|
|
|
|
|
|
|
| |
Removes unnecessary casts from non-generic address spaces to the generic address
space for certain code patterns.
Patch by Jingyue Wu.
llvm-svn: 205571
|
|
|
|
|
|
|
|
| |
This is a more thorough fix for the issue than r203483. An IR pass will run
before NVPTX codegen to make sure there are no invalid symbol names that can't
be consumed by the ptxas assembler.
llvm-svn: 205212
|
|
|
|
|
|
| |
Make sure such IR gets properly lowered to PTX.
llvm-svn: 204624
|
|
|
|
| |
llvm-svn: 204600
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "noduplicate" function attribute exists to prevent certain optimizations
from duplicating calls to the function. This is important on platforms where
certain function call duplications are unsafe (for example execution barriers
for CUDA and OpenCL).
This patch makes it possible to specify intrinsics as "noduplicate" and
translates that to the appropriate function attribute.
llvm-svn: 204200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These linkages were introduced some time ago, but it was never very
clear what exactly their semantics were or what they should be used
for. Some investigation found these uses:
* utf-16 strings in clang.
* non-unnamed_addr strings produced by the sanitizers.
It turns out they were just working around a more fundamental problem.
For some sections a MachO linker needs a symbol in order to split the
section into atoms, and llvm had no idea that was the case. I fixed
that in r201700 and it is now safe to use the private linkage. When
the object ends up in a section that requires symbols, llvm will use a
'l' prefix instead of a 'L' prefix and things just work.
With that, these linkages were already dead, but there was a potential
future user in the objc metadata information. I am still looking at
CGObjcMac.cpp, but at this point I am convinced that linker_private
and linker_private_weak are not what they need.
The objc uses are currently split in
* Regular symbols (no '\01' prefix). LLVM already directly provides
whatever semantics they need.
* Uses of a private name (start with "\01L" or "\01l") and private
linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm
agrees with clang on L being ok or not for a given section. I have two
patches in code review for this.
* Uses of private name and weak linkage.
The last case is the one that one could think would fit one of these
linkages. That is not the case. The semantics are
* the linker will merge these symbol by *name*.
* the linker will hide them in the final DSO.
Given that the merging is done by name, any of the private (or
internal) linkages would be a bad match. They allow llvm to rename the
symbols, and that is really not what we want. From the llvm point of
view, these objects should really be (linkonce|weak)(_odr)?.
For now, just keeping the "\01l" prefix is probably the best for these
symbols. If we one day want to have a more direct support in llvm,
IMHO what we should add is not a linkage, it is just a hidden_symbol
attribute. It would be applicable to multiple linkages. For example,
on weak it would produce the current behavior we have for objc
metadata. On internal, it would be equivalent to private (and we
should then remove private).
llvm-svn: 203866
|
|
|
|
|
|
| |
[forgot to 'svn add' before committing r203483]
llvm-svn: 203485
|
|
|
|
|
|
|
|
| |
The code was missing the case for aggregate parameters and
hence was emitting them as .b0 type. Also fixed a couple
of comments.
llvm-svn: 200325
|
|
|
|
| |
llvm-svn: 199746
|
|
|
|
|
|
|
| |
Reset SelectionDAGBuilder's SDNodeOrder to ensure deterministic code
generation.
llvm-svn: 199050
|
|
|
|
| |
llvm-svn: 196503
|
|
|
|
|
|
| |
Using a special machine node is cleaner than an InlineAsm node, and fixes an assertion failure in InstrEmitter
llvm-svn: 194810
|
|
|
|
|
|
| |
of function parameters
llvm-svn: 194410
|
|
|
|
| |
llvm-svn: 194409
|
|
|
|
|
|
|
|
| |
NVPTXTargetMachine, and add some missing optimization passes to addOptimizedRegAlloc
Fixes PR17529
llvm-svn: 192445
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
comments for implicit defs
For NVPTX, this fixes a crash where the emitImplicitDef implementation was expecting physical registers,
while NVPTX uses virtual registers (with a couple of exceptions). Now, the implicit def comment will be
emitted as a true PTX register name. Other targets can use this to customize the output of implicit def
comments.
Fixes PR17519
llvm-svn: 192444
|
|
|
|
| |
llvm-svn: 190998
|
|
|
|
| |
llvm-svn: 190997
|
|
|
|
|
|
| |
This support was removed by accident during the MC conversion
llvm-svn: 189160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Instead of setting the suffixes in a bunch of places, just set one master
list in the top-level config. We now only modify the suffix list in a few
suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py).
- Aside from removing the need for a bunch of lit.local.cfg files, this enables
4 tests that were inadvertently being skipped (one in
Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and
CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been
XFAILED).
- This commit also fixes a bunch of config files to use config.root instead of
older copy-pasted code.
llvm-svn: 188513
|
|
|
|
| |
llvm-svn: 187800
|
|
|
|
|
|
|
| |
We do use a very small set of physical registers, so account for
them in the virtual register encoding between MachineInstr and MC
llvm-svn: 187799
|
|
|
|
|
|
|
|
|
| |
This change converts the NVPTX target to use the MC infrastructure
instead of directly emitting MachineInstr instances. This brings
the target more up-to-date with LLVM TOT, and should fix PR15175
and PR15958 (libNVPTXInstPrinter is empty) as a side-effect.
llvm-svn: 187798
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.
This also adds a test case for NVPTX that depends on this custom
legalization.
Differential Revision: http://llvm-reviews.chandlerc.com/D1195
Attempt to fix the buildbots by making the X86 test I just added platform independent
llvm-svn: 187202
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 187198. It broke the bots.
The soft float test probably needs a -triple because of name differences.
On the hard float test I am getting a "roundss $1, %xmm0, %xmm0", instead of
"vroundss $1, %xmm0, %xmm0, %xmm0".
llvm-svn: 187201
|
|
|
|
|
|
|
|
|
|
|
|
| |
CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.
This also adds a test case for NVPTX that depends on this custom
legalization.
Differential Revision: http://llvm-reviews.chandlerc.com/D1195
llvm-svn: 187198
|
|
|
|
|
|
| |
.ftz to instructions if the nvptx-f32ftz attribute is set to "true"
llvm-svn: 186820
|
|
|
|
|
|
|
|
|
|
| |
debugging. No functionality change and all tests pass after conversion.
This was done with the following sed invocation to catch label lines demarking function boundaries:
sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll
which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct.
llvm-svn: 186258
|
|
|
|
|
|
|
| |
Since we were explicitly not calling AsmPrinter::doInitialization,
any module-scope inline asm was not being printed.
llvm-svn: 185336
|
|
|
|
| |
llvm-svn: 185333
|
|
|
|
|
|
| |
some typos
llvm-svn: 185332
|
|
|
|
|
|
|
|
| |
Fix a case where we were incorrectly sign-extending a value when we should have been zero-extending the value.
Also change some SIGN_EXTEND to ANY_EXTEND because we really dont care and may have more opportunity to fold subexpressions
llvm-svn: 185331
|
|
|
|
| |
llvm-svn: 185330
|
|
|
|
| |
llvm-svn: 185329
|
|
|
|
|
|
| |
value
llvm-svn: 185328
|
|
|
|
| |
llvm-svn: 185178
|
|
|
|
|
|
|
|
| |
Fix ABI handling for function
returning bool -- use st.param.b32 to return the value
and use ld.param.b32 in caller to load the return value.
llvm-svn: 185177
|
|
|
|
| |
llvm-svn: 185176
|
|
|
|
|
|
|
|
| |
instructions from their patterns
Test case is no breakage
llvm-svn: 185175
|