| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LowerVSELECT will, if possible, generate a X86ISD::BLENDI DAG node if the
condition is constant and we can emit that instruction, given the
subtarget.
This is not enough for all cases. An additional SELECTCombine optimization
will be committed.
Fixed tests that were expecting variable blends but where a blend+imm can
be generated.
Added test where we can't emit blend+immediate.
Added avx2 blend+imm tests.
llvm-svn: 209043
|
| |
|
|
|
|
|
|
| |
Patch by Stephan Tolksdorf! (with some test case stuff by me)
Differential Revision: http://reviews.llvm.org/D3810
llvm-svn: 209037
|
| |
|
|
| |
llvm-svn: 209024
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to put dynamic initializers for weak data into the same
comdat group as the data being initialized. This is necessary for MSVC
ABI compatibility. Once we have comdats for guard variables, we can use
the combination to help GlobalOpt fire more often for weak data with
guarded initialization on other platforms.
Reviewers: nlewycky
Differential Revision: http://reviews.llvm.org/D3499
llvm-svn: 209015
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the design of GlobalAlias so that it doesn't take a
ConstantExpr anymore. It now points directly to a GlobalObject, but its type is
independent of the aliasee type.
To avoid changing all alias related tests in this patches, I kept the common
syntax
@foo = alias i32* @bar
to mean the same as now. The cases that used to use cast now use the more
general syntax
@foo = alias i16, i32* @bar.
Note that GlobalAlias now behaves a bit more like GlobalVariable. We
know that its type is always a pointer, so we omit the '*'.
For the bitcode, a nice surprise is that we were writing both identical types
already, so the format change is minimal. Auto upgrade is handled by looking
through the casts and no new fields are needed for now. New bitcode will
simply have different types for Alias and Aliasee.
One last interesting point in the patch is that replaceAllUsesWith becomes
smart enough to avoid putting a ConstantExpr in the aliasee. This seems better
than checking and updating every caller.
A followup patch will delete getAliasedGlobal now that it is redundant. Another
patch will add support for an explicit offset.
llvm-svn: 209007
|
| |
|
|
|
|
|
|
|
|
|
| |
DIBuilder maintains this invariant and the current DwarfDebug code could
end up doing weird things if it contained declarations (such as putting
the definition DIE inside a CU that contained the declaration - this
doesn't seem like a good idea, so rather than adding logic to handle
this case we'll just ban in for now & cross that bridge if we come to
it later).
llvm-svn: 209004
|
| |
|
|
|
|
|
| |
Patch by Dave Estes <cestes@codeaurora.org>
http://reviews.llvm.org/D3769
llvm-svn: 209001
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Analyze the range of values produced by ashr/lshr cst, %V when it is
being used in an icmp.
Reviewers: nicholas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3774
llvm-svn: 209000
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The dividend in an sdiv tells us the largest and smallest possible
results. Use this fact to optimize comparisons against an sdiv with a
constant dividend.
Reviewers: nicholas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3795
llvm-svn: 208999
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the only method to configure ELF section's content and size is to assign
a hexadecimal string to the `Content` field. Unfortunately this way is
completely useless when you need to declare a really large section.
To solve this problem this patch adds one more optional field `Size`
to the `RawContentSection` structure. When yaml2obj generates an ELF file
it uses the following algorithm:
1. If both `Content` and `Size` fields are missed create an empty section.
2. If only `Content` field is missed take section length from the `Size`
field and fill the section by zero.
3. If only `Size` field is missed create a section using data from
the `Content` field.
4. If both `Content` and `Size` fields are provided validate that the `Size`
value is not less than size of `Content` data. Than take section length
from the `Size`, fill beginning of the section by `Content` and the rest
by zero.
Examples
--------
* Create a section 0x10000 bytes long filled by zero
Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Size: 0x10000
* Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE'
Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Content: CAFEBABE
Size: 0x10000
The patch reviewed by Michael Spencer.
llvm-svn: 208995
|
| |
|
|
|
|
| |
Patch by Moritz Roth!
llvm-svn: 208994
|
| |
|
|
|
|
| |
Patch by Moritz Roth!
llvm-svn: 208992
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3743
llvm-svn: 208987
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3707
llvm-svn: 208981
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r208934.
The patch depends on aliases to GEPs with non zero offsets. That is not
supported and fairly broken.
The good news is that GlobalAlias is being redesigned and will have support
for offsets, so this patch should be a nice match for it.
llvm-svn: 208978
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3718
llvm-svn: 208977
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3691
llvm-svn: 208974
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3788
llvm-svn: 208971
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3750
llvm-svn: 208970
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TableGen has a fairly dubious heuristic to decide whether an alias should be
printed: does the alias have lest operands than the real instruction. This is
bad enough (particularly with no way to override it), but it should at least be
calculated consistently for both strings.
This patch implements that logic: first get the *correct* string for the
variant, in the same way as the Matcher, without guessing; then count the
number of whitespace chars.
There are basically 4 changes this brings about after the previous
commits; all of these appear to be good, so I have changed the tests:
+ ARM64: we print "neg X, Y" instead of "sub X, xzr, Y".
+ ARM64: we skip implicit "uxtx" and "uxtw" modifiers.
+ Sparc: we print "mov A, B" instead of "or %g0, A, B".
+ Sparc: we print "fcmpX A, B" instead of "fcmpX %fcc0, A, B"
llvm-svn: 208969
|
| |
|
|
| |
llvm-svn: 208955
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3727
llvm-svn: 208952
|
| |
|
|
|
|
|
|
| |
Add some Windows on ARM specific library calls. These are provided by msvcrt,
and can be used to perform integer to floating-point conversions (and
vice-versa) mirroring similar functions in the RTABI.
llvm-svn: 208949
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow multiple raw profiles to coexist in a single .profraw file,
given the following conditions:
- Zero padding at the end of or between profiles will be skipped.
- Each profile must start with a valid header.
- Mixing endianness or pointer sizes in concatenated profiles files is
not allowed.
This is needed to handle cases where a program's shared libraries are
profiled as well as the main executable itself, as we'll need to emit
each executable's counters. Combining the tables in the runtime would
be expensive for the instrumented program.
rdar://16918688
llvm-svn: 208938
|
| |
|
|
|
|
|
| |
Previously this would fail with an assertion failure when trying to add
an alignment attribute without a value.
llvm-svn: 208935
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit implements two command line switches -global-merge-on-external
and -global-merge-aligned, and both of them are false by default, so this
optimization is disabled by default for all targets.
For ARM64, some back-end behaviors need to be tuned to get this optimization
further enabled.
llvm-svn: 208934
|
| |
|
|
|
|
|
|
|
| |
Since type units in the dwo file are handled by a debug aware tool, they
don't need to leverage the ELF comdat grouping to implement
deduplication. Avoid creating all the .group sections for these as a
space optimization.
llvm-svn: 208930
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: We add code to materialize all integer literals.
Test Plan: simplestorei.ll
Reviewers: dsanders
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D3596
llvm-svn: 208923
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The allocas going out of scope are immediately killed by the return
instruction.
This is a resend of r208912, which was committed accidentally.
Reviewers: chandlerc
Differential Revision: http://reviews.llvm.org/D3792
llvm-svn: 208920
|
| |
|
|
|
|
|
|
| |
This reverts commit r208912.
It was committed accidentally without review.
llvm-svn: 208914
|
| |
|
|
|
|
|
|
|
|
|
| |
The allocas going out of scope are immediately killed by the return
instruction.
Reviewers: chandlerc
Differential Revision: http://reviews.llvm.org/D3630
llvm-svn: 208912
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The interesting case is what happens when you inline a musttail call
through a musttail call site. In this case, we can't break perfect
forwarding or allow any stack growth.
Instead of merging control flow from the inlined return instruction
after a musttail call into the body of the caller, leave the inlined
return instruction in the caller so that the musttail call stays in the
tail position.
More work is required in http://reviews.llvm.org/D3630 to handle the
case where the inlined function has dynamic allocas or byval arguments.
Reviewers: chandlerc
Differential Revision: http://reviews.llvm.org/D3491
llvm-svn: 208910
|
| |
|
|
|
|
| |
types to hold relocation's offset and addend.
llvm-svn: 208906
|
| |
|
|
| |
llvm-svn: 208905
|
| |
|
|
| |
llvm-svn: 208902
|
| |
|
|
| |
llvm-svn: 208900
|
| |
|
|
| |
llvm-svn: 208897
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added target specific combine rules to fold blend intrinsics according
to the following rules:
1) fold(blend A, A, Mask) -> A;
2) fold(blend A, B, <allZeros>) -> A;
3) fold(blend A, B, <allOnes>) -> B.
Added two new tests to verify that the new folding rules work for all
the optimized blend intrinsics.
llvm-svn: 208895
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3712
llvm-svn: 208894
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3711
llvm-svn: 208892
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3710
llvm-svn: 208891
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3709
llvm-svn: 208890
|
| |
|
|
| |
llvm-svn: 208886
|
| |
|
|
| |
llvm-svn: 208885
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D3728
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3729
llvm-svn: 208877
|
| |
|
|
|
|
|
|
| |
In all cases, if a "mov" alias exists, it is the canonical form of the
instruction. Now that TableGen can support aliases containing syntax variants,
we can enable them and improve the quality of the asm output.
llvm-svn: 208874
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D3689
Reviewers: vmedic, zoran.jovanovic, jkolek
Reviewed By: jkolek
Differential Revision: http://reviews.llvm.org/D3728
llvm-svn: 208872
|
| |
|
|
|
|
|
| |
To get at least one use of the change (and some actual tests) in with its
commit, I've enabled the AArch64 & ARM64 NEON mov aliases.
llvm-svn: 208867
|
| |
|
|
| |
llvm-svn: 208864
|
| |
|
|
| |
llvm-svn: 208862
|