Eric Christopher [Sun, 15 Jun 2014 19:55:14 +0000 (19:55 +0000)]
Temporarily revert r210953 in an attempt to bring the ARM buildbots
back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210996
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 15 Jun 2014 19:48:16 +0000 (19:48 +0000)]
R600: Report that integer division is expensive.
Divides by weird constants now emit much better code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210995
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 15 Jun 2014 19:48:13 +0000 (19:48 +0000)]
R600: Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210994
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 15 Jun 2014 19:34:26 +0000 (19:34 +0000)]
PR20038: DebugInfo missing DIEs for some concrete variables.
I haven't nailed this down entirely, but this is about as small of a
test case as I can seem to construct and adequately demonstrates the
crasher. I'll continue investigating the root cause/fix(es).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210993
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Sun, 15 Jun 2014 14:42:25 +0000 (14:42 +0000)]
Add specialization of FoldingSetTrait for std::pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210990
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 15 Jun 2014 09:27:20 +0000 (09:27 +0000)]
LegalizeDAG: make sure cast is unsigned before using FP_TO_UINT.
It's valid to use FP_TO_SINT when asking for a smaller type (e.g. all
"unsigned int16" values fit into a "signed int32"), but the reverse
isn't true.
Unfortunately, I'm not actually aware of any architecture with
asymmetric FP_TO_SINT and FP_TO_UINT handling and the logic happens to
work in the symmetric case, so I can't actually write a test for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210986
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 15 Jun 2014 09:27:15 +0000 (09:27 +0000)]
AArch64: improve handling & modelling of FP_TO_XINT nodes.
There's probably no acatual change in behaviour here, just updating
the LowerFP_TO_INT function to be more similar to the reverse
implementation and updating costs to current CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210985
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 15 Jun 2014 09:27:06 +0000 (09:27 +0000)]
AArch64: improve vector [su]itofp handling.
This somehow got missed in the AArch64 merge, so should fix a
performance regression since 3.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210984
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 15 Jun 2014 01:01:11 +0000 (01:01 +0000)]
Don't expect tests always crashing. Add "REQUIRES:asserts".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210983
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Sat, 14 Jun 2014 13:49:57 +0000 (13:49 +0000)]
Replacing the private implementations of SwapValue with calls to sys::swapByteOrder()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210980
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Sat, 14 Jun 2014 13:18:07 +0000 (13:18 +0000)]
Using llvm::sys::swapByteOrder() for the common case of byte-swapping a value in place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210978
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Sat, 14 Jun 2014 12:52:55 +0000 (12:52 +0000)]
Adding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a value in place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210976
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Sat, 14 Jun 2014 11:36:01 +0000 (11:36 +0000)]
Renaming SwapByteOrder() to getSwappedBytes()
The next commit will add swapByteOrder(), acting in-place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210973
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Jun 2014 04:26:09 +0000 (04:26 +0000)]
R600: Add failing testcases.
These are reduced from assert in the
OpenCV CvtColor8u.BGR5652GRAY test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210969
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Jun 2014 04:26:07 +0000 (04:26 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210968
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Jun 2014 04:26:05 +0000 (04:26 +0000)]
R600: Fix asserts related to constant initializers
This would assert if a constant address space was extern
and therefore didn't have an initializer. If the initializer
was undef, it would hit the unreachable unhandled initializer case.
An extern global should never really occur since we don't have
machine linking, but bugpoint likes to remove initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210967
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Jun 2014 04:26:01 +0000 (04:26 +0000)]
R600: Use address space enum instead of value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210966
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 14 Jun 2014 03:48:29 +0000 (03:48 +0000)]
Remove extra whitespace in function declaration. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210965
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Jun 2014 23:52:55 +0000 (23:52 +0000)]
DebugInfo: Remove some extra handling of abstract variables and instead rely solely on the delayed handling introduced in r210946
Now that we handle finding abstract variables at the end of the module,
remove the upfront handling and just ensure the abstract variable is
built when necessary.
In theory we could have a split implementation, where inlined variables
are immediately constructed referencing the abstract definition, and
concrete variables are delayed - but let's go with one solution for now
unless there's a reason not to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210961
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Jun 2014 23:11:13 +0000 (23:11 +0000)]
Remove InstrItineraryData off of the TargetMachine - it's already
on the subtarget and just forward the accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210955
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Jun 2014 23:04:46 +0000 (23:04 +0000)]
Move ARMJITInfo off of the TargetMachine and down onto the subtarget.
This required untangling a mess of headers that included around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210953
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Fri, 13 Jun 2014 23:00:36 +0000 (23:00 +0000)]
Complete remove test/Transforms/GlobalMerge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210952
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Fri, 13 Jun 2014 22:57:59 +0000 (22:57 +0000)]
Move GlobalMerge from Transform to CodeGen.
This patch is to move GlobalMerge pass from Transform/Scalar
to CodeGen, because GlobalMerge depends on TargetMachine.
In the mean time, the macro INITIALIZE_TM_PASS is also moved
to CodeGen/Passes.h. With this fix we can avoid making
libScalarOpts depend on libCodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210951
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Jun 2014 22:38:52 +0000 (22:38 +0000)]
The hazard recognizer only needs a subtarget, not a target machine
so make it take one. Fix up all users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210948
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Jun 2014 22:38:48 +0000 (22:38 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210947
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Jun 2014 22:35:44 +0000 (22:35 +0000)]
DebugInfo: Reference abstract definitions from variables in concrete definitions that preceed their first inline definition.
Rather than relying on abstract variables looked up at the time the
concrete variable is created, look them up at the end of the module to
ensure they're referenced even if they're created after the concrete
definition. This completes/matches the work done in r209677 to handle
this for the subprograms themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210946
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 13 Jun 2014 22:31:03 +0000 (22:31 +0000)]
[DWARF parser] Use distinction between DW_AT_ranges_base and DW_AT_GNU_ranges_base instead of DWARF version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210945
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Jun 2014 22:29:31 +0000 (22:29 +0000)]
DwarfDebug::getExistingAbstractVariable: constify an existing reference parameter that didn't need to be mutated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210944
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Jun 2014 22:18:23 +0000 (22:18 +0000)]
DebugInfo: Following up to r209677, refactor local variable emission to delay the choice between emitting the definition attributes or using DW_AT_abstract_definition
This doesn't fix the abstract variable handling yet, but it introduces a
similar delay mechanism as was added for subprograms, causing
DW_AT_location to be reordered to the beginning of the attribute list
for local variables, and fixes all the test fallout for that.
A subsequent commit will remove the abstract variable handling in
DbgVariable and just do the abstract variable lookup at module end to
ensure that abstract variables introduced after their concrete
counterparts are appropriately referenced by the concrete variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210943
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Jun 2014 21:52:33 +0000 (21:52 +0000)]
DebugInfo: Refactor some tests to allow DW_AT_name to not be the first attribute in a local variable.
In an effort to fix concrete variables referencing abstract origins
where the concrete variable preceeds the first inlined usage, the
addition of attributes such as name, file, etc will be delayed until the
end of the module (to wait to see if any inlined instances have
occurred, thus necessitating an abstract definition that the concrete
definition should also reference).
These test cases don't actually need to care about this ordering of
attributes, so update them to be more resilient to such changes coming
in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210940
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Jun 2014 21:52:28 +0000 (21:52 +0000)]
test/DebugInfo/X86/dbg-value-isel.s: correct lexical block descriptor to match schema
This silently broke a long time ago when I unified some aspects of the
debug info schema. I'm just cleaning these up if/when they become a
problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210939
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 13 Jun 2014 21:20:44 +0000 (21:20 +0000)]
Make the error-handling functions thread-safe.
Prior to this change, error handling functions must be installed
and removed only inside of an llvm_[start/stop]_multithreading
pair. This change allows error handling functions to be installed
any time, and from any thread.
Reviewed by: chandlerc
Differential Revision: http://reviews.llvm.org/D4140
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210937
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 13 Jun 2014 17:53:44 +0000 (17:53 +0000)]
Remove top-level Clang -fsanitize= flags for optional ASan features.
Init-order and use-after-return modes can currently be enabled
by runtime flags. use-after-scope mode is not really working at the
moment.
The only problem I see is that users won't be able to disable extra
instrumentation for init-order and use-after-scope by a top-level Clang flag.
But this instrumentation was implicitly enabled for quite a while and
we didn't hear from users hurt by it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210924
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 17:29:39 +0000 (17:29 +0000)]
X86: lower ATOMIC_CMP_SWAP_WITH_SUCCESS directly
Lowering this new node allows us to fold the almost universal
comparison for success before it's even formed. Instead we can create
a copy from EFLAGS and an X86ISD::SETCC operation since all "cmpxchg"
instructions set the zero-flag to the correct value.
rdar://problem/
13201607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210923
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 13 Jun 2014 17:20:53 +0000 (17:20 +0000)]
R600: Cleanup some old AMDIL stuff.
Move / delete some of the more obviously wrong
setOperationAction calls. Most of these are setting Expand
for types that aren't legal which is the default anyway.
Leave stuff that might require more thought on whether it's
junk or not as it is.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210922
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 17:20:48 +0000 (17:20 +0000)]
Finishing touch for the std::error_code transition.
While std::error_code itself seems to work OK in all platforms, there
are few annoying differences with regards to the std::errc enumeration.
This patch adds a simple llvm enumeration, which will hopefully avoid build
breakages in other platforms and surprises as we get more uses of
std::error_code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210920
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 16:45:52 +0000 (16:45 +0000)]
Atomics: make use of the "cmpxchg weak" instruction.
This also simplifies the IR we create slightly: instead of working out
where success & failure should go manually, it turns out we can just
always jump to a success/failure block created for the purpose. Later
phases will sort out the mess without much difficulty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210917
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 16:45:36 +0000 (16:45 +0000)]
Atomics: switch direction of cmpxchg comparison
This has two benefits: it makes the result more suitable for direct
insertaion into the struct to emulate the new cmpxchg, and it means
the name we give the instruction matches its actual effect better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210916
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Jun 2014 16:38:59 +0000 (16:38 +0000)]
R600: Remove AMDIL instruction and register definitions
Most of these are no longer used any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210915
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Fri, 13 Jun 2014 16:12:08 +0000 (16:12 +0000)]
opt: Initialize asm printers
Without initializing the assembly printers a shared library build of opt is
linked with these libraries whereas for a static build these libraries are dead
code eliminated. This is unfortunate for plugins in case they want to use them,
as they neither can rely on opt to provide this functionality nor can they link
the printers in themselves as this breaks with a shared object build of opt.
This patch calls InitializeAllAsmPrinters() from opt, which increases the static
binary size from 50MB -> 52MB on my system (all backends compiled) and causes no
measurable increase in the time needed to run 'make check'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210914
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 15:36:17 +0000 (15:36 +0000)]
Remove unused and odd code.
This code was never being used and any use of it would look fairly strange.
For example, it would try to map a object_error::parse_failed to
std::errc::invalid_argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210912
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 15:21:50 +0000 (15:21 +0000)]
Remove broken include.
Looks like I got some git merge wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210911
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 15:01:11 +0000 (15:01 +0000)]
Fix KillTheDoctor after r210725.
We don't map these windows errors to generic ones since errc::timed_out is
not defined on mingw. Just use the raw windows error value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210910
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 14:54:09 +0000 (14:54 +0000)]
SCCP: update for cmpxchg returning { iN, i1 } now.
I accidentally missed this one since its use looked OK locally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210909
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Fri, 13 Jun 2014 14:26:47 +0000 (14:26 +0000)]
[mips][mips64r6] Relocation R_MIPS_PC18_S3
Differential Revision: http://reviews.llvm.org/D3890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210908
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 14:24:23 +0000 (14:24 +0000)]
Docs: remove extra {} around result types.
It makes the types look like they're single-element structures. And
when we have instructions that *do* result in a struct, that can get
confusing rather quickly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210905
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 14:24:16 +0000 (14:24 +0000)]
Docs: fix grammar error in description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210904
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 14:24:07 +0000 (14:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210903
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Fri, 13 Jun 2014 13:20:01 +0000 (13:20 +0000)]
Fix bad copy-and-paste from r210652. AVX512 masked leading zero intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210901
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Jun 2014 13:15:59 +0000 (13:15 +0000)]
[mips] Add cache and pref instructions
Summary:
cache and pref were added in MIPS-III, and MIPS32 but were re-encoded in
MIPS32r6/MIPS64r6 to use a 9-bit offset rather than the 16-bit offset
available to earlier cores.
Resolved the decoding conflict between pref and lwc3.
Depends on D4115
Reviewers: zoran.jovanovic, jkolek, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D4116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210900
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Jun 2014 13:08:38 +0000 (13:08 +0000)]
[mips][mips64r6] bc1any[24] are not available on MIPS32r6/MIPS64r6
Summary:
These MIPS-3D instructions have never been implemented in LLVM so we only
add testcases.
Reviewers: zoran.jovanovic, jkolek, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D4115
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210899
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Jun 2014 13:02:52 +0000 (13:02 +0000)]
[mips][mips64r6] b(ge|lt)zal are not available on MIPS32r6/MIPS64r6 and bal is a normal instruction
Summary:
b(ge|lt)zal have been removed in MIPS32r6/MIPS64r6. However, bal (an alias
for 'bgezal $zero, $offset') still remains with the same encoding it had
prior to MIPS32r6/MIPS64r6.
Updated the MipsNaCLELFStreamer, and MipsLongBranch to correctly handle the
MIPS32r6/MIPS64r6 BAL instruction in addition to the existing BAL_BR pseudo.
No changes were required to the CodeGen test that looks for BAL
(test/CodeGen/Mips/longbranch.ll) since the new instruction has the same
syntax.
Depends on D4113
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D4114
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210898
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Jun 2014 12:49:06 +0000 (12:49 +0000)]
[mips][mips64r6] daddi is not available on MIPS64r6
Summary:
It's not emitted by the code generator so we only need assembler tests.
Also added missing daddi aliases from dsub mnemonics, and removed a couple
duplicate dsub tests.
Depends on D4112
Reviewers: zoran.jovanovic, jkolek, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D4113
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210897
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 13 Jun 2014 12:23:56 +0000 (12:23 +0000)]
[Win32] Let utils/not aware of abort(), aka llvm_unreachable(), in msvcrt.
It has exit code as 3. abort(), aka unreachable, may be handled as crash.
FIXME: Could we move this into Win32/Program.inc?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210895
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 13 Jun 2014 12:05:06 +0000 (12:05 +0000)]
llvm/test/CodeGen/X86/fast-isel-args-fail2.ll: Don't expect to fail with -Asserts. It might or might not crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210894
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Fri, 13 Jun 2014 11:40:31 +0000 (11:40 +0000)]
Add HasCDI predicate to AVX512 VPBROADCASTM*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210892
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Jun 2014 09:14:50 +0000 (09:14 +0000)]
CPP backend: set volatile property on atomic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210890
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Fri, 13 Jun 2014 08:33:03 +0000 (08:33 +0000)]
ARM: Fix fastcc calling convention for Thumb1
When targetting Thumb1 on a processor which has a VFP unit (which
is not accessible from Thumb1), we were converting the fastcc calling
convention to AAPCS-VFP, which is not possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210889
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 13 Jun 2014 07:44:38 +0000 (07:44 +0000)]
R600: Don't call setOperationAction with things that aren't opcodes.
CondCode actions are set with setCondCodeAction.
This should have been a harmless bug since the values seem to only
collide only with nodes that don't need to be handled, and these are
already correctly setup elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210888
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 13 Jun 2014 04:00:30 +0000 (04:00 +0000)]
R600/SI: Fix selection error on i64 rotl / rotr.
Evergreen is still broken due to missing shl_parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210885
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 03:20:08 +0000 (03:20 +0000)]
Remove the last uses of 'using std::error_code'
This finishes the transition to std::error_code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210877
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 03:07:50 +0000 (03:07 +0000)]
Remove 'using std::error_code' from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210876
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 02:36:09 +0000 (02:36 +0000)]
Fix build on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210873
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 02:24:39 +0000 (02:24 +0000)]
Remove 'using std::errro_code' from lib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210871
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 13 Jun 2014 02:21:58 +0000 (02:21 +0000)]
[FastISel][X86] Add support for cvttss2si/cvttsd2si intrinsics.
This adds support for the cvttss2si/cvttsd2si intrinsics. Preceding
insertelement instructions are folded into the conversion instruction (if
possible).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210870
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Jun 2014 01:32:00 +0000 (01:32 +0000)]
R600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtarget
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210869
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Jun 2014 01:31:56 +0000 (01:31 +0000)]
R600: Drop use of cached TargetMachine in R600InstrInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210868
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Jun 2014 01:25:41 +0000 (01:25 +0000)]
Remove all uses of 'using std::error_code' from headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210866
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Jun 2014 01:02:57 +0000 (01:02 +0000)]
R600: Drop use of cached TargetMachine in AMDGPUInstrInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210865
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 13 Jun 2014 00:45:11 +0000 (00:45 +0000)]
[FastISel][X86] - Add branch weights
Add branch weights to branch instructions, so that the following passes can
optimize based on it (i.e. basic block ordering).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210863
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Jun 2014 00:20:39 +0000 (00:20 +0000)]
Move ARMSelectionDAGInfo from the TargetMachine to the subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210862
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Jun 2014 00:20:35 +0000 (00:20 +0000)]
Move to a private function to initialize subtarget dependencies
so we can use initializer lists for the ARMSubtarget and then
use this to initialize a moved DataLayout on the subtarget from
the TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210861
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 12 Jun 2014 23:58:49 +0000 (23:58 +0000)]
[DWARF parser] Fix broken address ranges construction.
Previous algorithm for constructing [Address ranges]->[Compile Units]
mapping was wrong. It somewhat relied on the assumption that address ranges
for different compile units may not overlap. It is not so.
For example, two compile units may contain the definition of the same
linkonce_odr function. These definitions will be merged at link-time,
resulting in equivalent .debug_ranges entries for both these units
Instead of sorting and merging original address ranges (from .debug_ranges
and .debug_aranges), implement a different approach: save endpoints
of all ranges, and then use a sweep-line approach to construct
the desired mapping. If we find that certain address maps to
several compilation units, we just pick any of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210860
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 23:39:49 +0000 (23:39 +0000)]
Have ARMSelectionDAGInfo take a DataLayout as it's argument as the
DAG has access to the subtarget and TargetSelectionDAGInfo only
needs a DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210859
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 12 Jun 2014 23:27:57 +0000 (23:27 +0000)]
[FastISel][X86] Add MachineMemOperand to load/store instructions.
This commit adds MachineMemOperands to load and store instructions. This allows
the peephole optimizer to fold load instructions. Unfortunatelly the peephole
optimizer currently doesn't run at -O0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210858
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 23:02:32 +0000 (23:02 +0000)]
Move the PPCSelectionDAGInfo off the TargetMachine and onto the
subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210854
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:56:48 +0000 (22:56 +0000)]
Make PPCSelectionDAGInfo take a DataLayout instead of a TargetMachine
since that's all it needs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210853
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:50:10 +0000 (22:50 +0000)]
Move PPCTargetLowering off of the TargetMachine and onto the subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210852
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:38:20 +0000 (22:38 +0000)]
Remove an extraneous this-> to access the subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210849
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:38:18 +0000 (22:38 +0000)]
Rename PPCSubTarget to Subtarget in PPCTargetLowering for consistency.
Also remove an extra local subtarget in the initialization functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210848
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 12 Jun 2014 22:36:28 +0000 (22:36 +0000)]
Fix the scheduler's MaxObservedStall computation.
WenHan Gu pointed out this bug that results in an assert
not being effective in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210846
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:28:06 +0000 (22:28 +0000)]
Move PPCJITInfo off of the TargetMachine and onto the subtarget.
Needed to migrate a few functions around to avoid circular header
dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210845
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:19:51 +0000 (22:19 +0000)]
Remove the use of TargetMachine from PPCJITInfo and replace with
the subtarget. Also remove unnecessary argument to the constructor
at the same time, we already have access via the subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210844
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Jun 2014 22:16:55 +0000 (22:16 +0000)]
Fix the build of KillTheDoctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210843
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 12 Jun 2014 22:09:39 +0000 (22:09 +0000)]
[modules] The LLVM C API does not require C++!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210842
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 22:05:46 +0000 (22:05 +0000)]
Move PPCInstrInfo off of the target machine and onto the subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210839
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Jun 2014 21:53:57 +0000 (21:53 +0000)]
Try to fix the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210837
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 21:48:52 +0000 (21:48 +0000)]
Remove TargetMachine from PPCInstrInfo and all dependencies and
replace with the current subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210836
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Jun 2014 21:46:39 +0000 (21:46 +0000)]
Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210835
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 12 Jun 2014 21:37:30 +0000 (21:37 +0000)]
Move test for r210734 to Feature/aliases.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210833
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 12 Jun 2014 21:27:03 +0000 (21:27 +0000)]
Delete trailing whitespace.
Hopefully this forces cmake to re-run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210830
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 12 Jun 2014 21:17:40 +0000 (21:17 +0000)]
Update test case to use "not" instead of "XFAIL".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210829
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 12 Jun 2014 21:16:19 +0000 (21:16 +0000)]
GVN: Enable value forwarding for calloc
Enable value forwarding for loads from `calloc()` without an intervening
store.
This change extends GVN to handle the following case:
%1 = tail call noalias i8* @calloc(i64 1, i64 4)
%2 = bitcast i8* %1 to i32*
; This load is trivially constant zero
%3 = load i32* %2, align 4
This is analogous to the handling for `malloc()` in the same places.
`malloc()` returns `undef`; `calloc()` returns a zero value. Note that
it is correct to return zero even for out of bounds GEPs since the
result of such a GEP would be undefined.
Patch by Philip Reames!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210828
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 12 Jun 2014 21:15:44 +0000 (21:15 +0000)]
R600: Mostly remove remaining AMDIL intrinsics.
Delete all unused ones, and add new AMDGPU named intrinsics for
the ones that are. Handle the old AMDIL names for comptability (although
remove their GCCBuiltin names) and add tests since there weren't any
for these before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210827
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 21:08:06 +0000 (21:08 +0000)]
Move DataLayout from the PPCTargetMachine to the subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210824
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Jun 2014 20:54:11 +0000 (20:54 +0000)]
Move PPCFrameLowering into PPCSubtarget from PPCTargetMachine. Use
the initializeSubtargetDependencies code to obtain an initialized
subtarget and migrate a couple of subtarget using functions to the
.cpp file to avoid circular includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210822
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 12 Jun 2014 20:40:33 +0000 (20:40 +0000)]
LangRef: clarify that global declarations can have section and alignment info.
I'm not sure what it means to set a section for a declaration in another
translation unit, but there are some tests in the tree that do it so it seems
to be legal now regardless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210819
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 12 Jun 2014 20:34:09 +0000 (20:34 +0000)]
[FastISel][X86] Argument lowering test case
This test case is supposed to xfail, because we do not handle structs or byval
arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210816
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 12 Jun 2014 20:12:34 +0000 (20:12 +0000)]
[FastIsel][X86] Add support for lowering the first 8 floating-point arguments.
Recommit with fixed argument attribute checking code, which is required to bail
out of all the cases we don't handle yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210815
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 12 Jun 2014 20:06:33 +0000 (20:06 +0000)]
CodeGen: enable mov.w/mov.t pairs with minsize for WoA
Windows on ARM uses COFF/PE which is intrinsically position independent. For
the case of 32-bit immediates, use a pair-wise relocation as otherwise we may
exceed the range of operators. This fixes a code generation crash when using
-Oz when targeting Windows on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210814
91177308-0d34-0410-b5e6-
96231b3b80d8