History log of /llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp (Results 451 – 475 of 500)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 84ce0a64 17-Jul-2014 Tim Northover <tnorthover@apple.com>

CodeGen: generate single libcall for fptrunc -> f16 operations.

Previously we asserted on this code. Currently compiler-rt doesn't
actually implement any of these new libcalls, but external help is

CodeGen: generate single libcall for fptrunc -> f16 operations.

Previously we asserted on this code. Currently compiler-rt doesn't
actually implement any of these new libcalls, but external help is
pretty much the only viable option for LLVM.

I've followed the much more generic "__truncST2" naming, as opposed to
the odd name for f32 -> f16 truncation. This can obviously be changed
later, or overridden by any targets that need to.

llvm-svn: 213252

show more ...


# 0b666e06 10-Jul-2014 Chandler Carruth <chandlerc@gmail.com>

[x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous
to the zero-extend-vector-inreg node introduced previously for the same
purpose: manage the type legalization of widened extend

[x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous
to the zero-extend-vector-inreg node introduced previously for the same
purpose: manage the type legalization of widened extend operations,
especially to support the experimental widening mode for x86.

I'm adding both because sign-extend is expanded in terms of any-extend
with shifts to propagate the sign bit. This removes the last
fundamental scalarization from vec_cast2.ll (a test case that hit many
really bad edge cases for widening legalization), although the trunc
tests in that file still appear scalarized because the the shuffle
legalization is scalarizing. Funny thing, I've been working on that.

Some initial experiments with this and SSE2 scenarios is showing
moderately good behavior already for sign extension. Still some work to
do on the shuffle combining on X86 before we're generating optimal
sequences, but avoiding scalarization is a huge step forward.

llvm-svn: 212714

show more ...


# cbd44c59 10-Jul-2014 Daniel Sanders <daniel.sanders@imgtec.com>

Make it possible for ints/floats to return different values from getBooleanContents()

Summary:
On MIPS32r6/MIPS64r6, floating point comparisons return 0 or -1 but integer
comparisons return 0 or 1.

Make it possible for ints/floats to return different values from getBooleanContents()

Summary:
On MIPS32r6/MIPS64r6, floating point comparisons return 0 or -1 but integer
comparisons return 0 or 1.

Updated the various uses of getBooleanContents. Two simplifications had to be
disabled when float and int boolean contents differ:
- ScalarizeVecRes_VSELECT except when the kind of boolean contents is trivially
discoverable (i.e. when the condition of the VSELECT is a SETCC node).
- visitVSELECT (select C, 0, 1) -> (xor C, 1).
Come to think of it, this one could test for the common case of 'C'
being a SETCC too.

Preserved existing behaviour for all other targets and updated the affected
MIPS32r6/MIPS64r6 tests. This also fixes the pi benchmark where the 'low'
variable was counting in the wrong direction because it thought it could simply
add the result of the comparison.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, jholewinski, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D4389

llvm-svn: 212697

show more ...


# d3561f6f 09-Jul-2014 Chandler Carruth <chandlerc@gmail.com>

[SDAG] Make the new zext-vector-inreg node default to expand so targets
don't need to set it manually.

This is based on feedback from Tom who pointed out that if every target
needs to handle this we

[SDAG] Make the new zext-vector-inreg node default to expand so targets
don't need to set it manually.

This is based on feedback from Tom who pointed out that if every target
needs to handle this we need to reach out to those maintainers. In fact,
it doesn't make sense to duplicate everything when anything other than
expand seems unlikely at this stage.

llvm-svn: 212661

show more ...


# 9d010fff 03-Jul-2014 Chandler Carruth <chandlerc@gmail.com>

[codegen,aarch64] Add a target hook to the code generator to control
vector type legalization strategies in a more fine grained manner, and
change the legalization of several v1iN types and v1f32 to

[codegen,aarch64] Add a target hook to the code generator to control
vector type legalization strategies in a more fine grained manner, and
change the legalization of several v1iN types and v1f32 to be widening
rather than scalarization on AArch64.

This fixes an assertion failure caused by scalarizing nodes like "v1i32
trunc v1i64". As v1i64 is legal it will fail to scalarize v1i32.

This also provides a foundation for other targets to have more granular
control over how vector types are legalized.

Patch by Hao Liu, reviewed by Tim Northover. I'm committing it to allow
some work to start taking place on top of this patch as it adds some
really important hooks to the backend that I'd like to immediately start
using. =]

http://reviews.llvm.org/D4322

llvm-svn: 212242

show more ...


# 420a2168 13-Jun-2014 Tim Northover <tnorthover@apple.com>

IR: add "cmpxchg weak" variant to support permitted failure.

This commit adds a weak variant of the cmpxchg operation, as described
in C++11. A cmpxchg instruction with this modifier is permitted to

IR: add "cmpxchg weak" variant to support permitted failure.

This commit adds a weak variant of the cmpxchg operation, as described
in C++11. A cmpxchg instruction with this modifier is permitted to
fail to store, even if the comparison indicated it should.

As a result, cmpxchg instructions must return a flag indicating
success in addition to their original iN value loaded. Thus, for
uniformity *all* cmpxchg instructions now return "{ iN, i1 }". The
second flag is 1 when the store succeeded.

At the DAG level, a new ATOMIC_CMP_SWAP_WITH_SUCCESS node has been
added as the natural representation for the new cmpxchg instructions.
It is a strong cmpxchg.

By default this gets Expanded to the existing ATOMIC_CMP_SWAP during
Legalization, so existing backends should see no change in behaviour.
If they wish to deal with the enhanced node instead, they can call
setOperationAction on it. Beware: as a node with 2 results, it cannot
be selected from TableGen.

Currently, no use is made of the extra information provided in this
patch. Test updates are almost entirely adapting the input IR to the
new scheme.

Summary for out of tree users:
------------------------------

+ Legacy Bitcode files are upgraded during read.
+ Legacy assembly IR files will be invalid.
+ Front-ends must adapt to different type for "cmpxchg".
+ Backends should be unaffected by default.

llvm-svn: 210903

show more ...


# d91d605f 02-Jun-2014 Eric Christopher <echristo@gmail.com>

InitLibcallNames can take a Triple instead of a TargetMachine.

llvm-svn: 210045


# 65382d73 22-May-2014 Eric Christopher <echristo@gmail.com>

Remove unused variable.

llvm-svn: 209391


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# ce4b3fee 27-Apr-2014 Benjamin Kramer <benny.kra@googlemail.com>

X86TTI: Adjust sdiv cost now that we can lower it on plain SSE2.

Includes a fix for a horrible typo that caused all SDIV costs to be
slightly off :)

llvm-svn: 207371


# 1a97a7bc 26-Apr-2014 Michael Zolotukhin <mzolotukhin@apple.com>

Revert r206749 till a final decision about the intrinsics is made.

llvm-svn: 207313


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2
# b23edebd 21-Apr-2014 Yi Jiang <yjiang@apple.com>

Set default value of HasExtractBitsInsn to false

llvm-svn: 206803


# f2ba994b 21-Apr-2014 Michael Zolotukhin <mzolotukhin@apple.com>

Reapply r206732. This time without optimization of branches.

llvm-svn: 206749


# a2533a7b 21-Apr-2014 Chandler Carruth <chandlerc@gmail.com>

Revert r206732 which is causing llc to crash on most of the build bots.

Original commit message:
Implement builtins for safe division: safe.sdiv.iN, safe.udiv.iN,
safe.srem.iN, safe.urem.iN (iN

Revert r206732 which is causing llc to crash on most of the build bots.

Original commit message:
Implement builtins for safe division: safe.sdiv.iN, safe.udiv.iN,
safe.srem.iN, safe.urem.iN (iN = i8, i61, i32, or i64).

llvm-svn: 206735

show more ...


# 137a8461 21-Apr-2014 Michael Zolotukhin <mzolotukhin@apple.com>

Implement builtins for safe division: safe.sdiv.iN, safe.udiv.iN, safe.srem.iN,
safe.urem.iN (iN = i8, i16, i32, or i64).

llvm-svn: 206732


# c0196b1b 14-Apr-2014 Craig Topper <craig.topper@gmail.com>

[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

llvm-svn: 206142


Revision tags: llvmorg-3.4.1-rc1
# f751d627 31-Mar-2014 Matt Arsenault <Matthew.Arsenault@amd.com>

Change shouldSplitVectorElementType to better match the description.

Pass the entire vector type, and not just the element.

llvm-svn: 205247


# 753eca0f 29-Mar-2014 Tim Northover <tnorthover@apple.com>

CodeGen: add sensible defaults for the ISD::FROUND operation

Some exotic types didn't know how to handle FROUND, which ARM64 uses.

llvm-svn: 205088


# cea0abb6 29-Mar-2014 Tim Northover <tnorthover@apple.com>

CodeGenPrep: wrangle IR to exploit AArch64 tbz/tbnz inst.

Given IR like:
%bit = and %val, #imm-with-1-bit-set
%tst = icmp %bit, 0
br i1 %tst, label %true, label %false

some targets can

CodeGenPrep: wrangle IR to exploit AArch64 tbz/tbnz inst.

Given IR like:
%bit = and %val, #imm-with-1-bit-set
%tst = icmp %bit, 0
br i1 %tst, label %true, label %false

some targets can emit just a single instruction (tbz/tbnz in the
AArch64 case). However, with ISel acting at the basic-block level, all
three instructions need to be together for this to be possible.

This adds another transformation to CodeGenPrep to expose these
opportunities, if targets opt in via the hook.

llvm-svn: 205086

show more ...


# d6f1f84f 02-Mar-2014 Benjamin Kramer <benny.kra@googlemail.com>

[C++11] Replace llvm::tie with std::tie.

The old implementation is no longer needed in C++11.

llvm-svn: 202644


# a3ad4e69 19-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

move getNameWithPrefix and getSymbol to TargetMachine.

TargetLoweringBase is implemented in CodeGen, so before this patch we had
a dependency fom Target to CodeGen. This would show up as a link fail

move getNameWithPrefix and getSymbol to TargetMachine.

TargetLoweringBase is implemented in CodeGen, so before this patch we had
a dependency fom Target to CodeGen. This would show up as a link failure of
llvm-stress when building with -DBUILD_SHARED_LIBS=ON.

This fixes pr18900.

llvm-svn: 201711

show more ...


# daeafb4c 19-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Add back r201608, r201622, r201624 and r201625

r201608 made llvm corretly handle private globals with MachO. r201622 fixed
a bug in it and r201624 and r201625 were changes for using private linkage,

Add back r201608, r201622, r201624 and r201625

r201608 made llvm corretly handle private globals with MachO. r201622 fixed
a bug in it and r201624 and r201625 were changes for using private linkage,
assuming that llvm would do the right thing.

They all got reverted because r201608 introduced a crash in LTO. This patch
includes a fix for that. The issue was that TargetLoweringObjectFile now has
to be initialized before we can mangle names of private globals. This is
trivially true during the normal codegen pipeline (the asm printer does it),
but LTO has to do it manually.

llvm-svn: 201700

show more ...


# 7e198ad8 19-Feb-2014 Daniel Jasper <djasper@google.com>

Revert r201622 and r201608.

This causes the LLVMgold plugin to segfault. More information on the
replies to r201608.

llvm-svn: 201669


# b9ea63c5 19-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Avoid an infinite cycle with private linkage and -f{data|function}-sections.

When outputting an object we check its section to find its name, but when
looking for the section with -ffunction-section

Avoid an infinite cycle with private linkage and -f{data|function}-sections.

When outputting an object we check its section to find its name, but when
looking for the section with -ffunction-section we look for the symbol name.

Break the loop by requesting a name with the private prefix when constructing
the section name. This matches the behavior before r201608.

llvm-svn: 201622

show more ...


# 09dcc6a5 18-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Fix PR18743.

The IR
@foo = private constant i32 42

is valid, but before this patch we would produce an invalid MachO from it. It
was invalid because it would use an L label in a section where the l

Fix PR18743.

The IR
@foo = private constant i32 42

is valid, but before this patch we would produce an invalid MachO from it. It
was invalid because it would use an L label in a section where the liker needs
the labels in order to atomize it.

One way of fixing it would be to just reject this IR in the backend, but that
would not be very front end friendly.

What this patch does is use an 'l' prefix in sections that we know the linker
requires symbols for atomizing them. This allows frontends to just use
private and not worry about which sections they go to or how the linker handles
them.

One small issue with this strategy is that now a symbol name depends on the
section, which is not available before codegen. This is not a problem in
practice. The reason is that it only happens with private linkage, which will
be ignored by the non codegen users (llvm-nm and llvm-ar).

llvm-svn: 201608

show more ...


# 7c68bebb 18-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Rename some member variables from TD to DL.

TargetData was renamed DataLayout back in r165242.

llvm-svn: 201581


1...<<11121314151617181920