Owen Anderson [Tue, 5 Feb 2013 19:24:39 +0000 (19:24 +0000)]
Reapply r174343, with a fix for a scary DAG combine bug where it failed to differentiate between the alignment of the
base point of a load, and the overall alignment of the load. This caused infinite loops in DAG combine with the
original application of this patch.
ORIGINAL COMMIT LOG:
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment. However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.
This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174431
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 5 Feb 2013 19:21:56 +0000 (19:21 +0000)]
InstCombine: Harden code to work with vectors of pointers and simplify it a bit.
Found by running instcombine on a fabricated test case for the constant folder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174430
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Feb 2013 19:20:45 +0000 (19:20 +0000)]
Hexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
zext( set[ne,eq,gt,ugt] (...) ) type of dag patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174429
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 5 Feb 2013 19:04:36 +0000 (19:04 +0000)]
ConstantFolding: Fix a crash when encoutering a truncating inttoptr.
This was introduced in r173293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174424
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 5 Feb 2013 18:46:41 +0000 (18:46 +0000)]
Loop Vectorizer: Refactor code to compute vectorized memory instruction cost
Introduce a helper class that computes the cost of memory access instructions.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174422
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Feb 2013 18:23:51 +0000 (18:23 +0000)]
Hexagon: Add testcase for post-increment store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174419
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 5 Feb 2013 18:23:10 +0000 (18:23 +0000)]
[SjLj Prepare] When demoting an invoke instructions to the stack, if the normal
edge is critical, then split it so we can insert the store.
rdar://
13126179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174418
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:56 +0000 (18:21 +0000)]
Remove liveout lists from MachineRegisterInfo.
All targets are now adding return value registers as implicit uses on
return instructions, and there is no longer a need for the live out
lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174417
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:52 +0000 (18:21 +0000)]
Remove special-casing of return blocks for liveness.
Now that return value registers are return instruction uses, there is no
need for special treatment of return blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174416
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:49 +0000 (18:21 +0000)]
Move MRI liveouts to AArch64 return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174415
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:46 +0000 (18:21 +0000)]
Move MRI liveouts to XCore return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174414
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:16:58 +0000 (18:16 +0000)]
Move MRI liveouts to Sparc return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174413
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Feb 2013 18:15:34 +0000 (18:15 +0000)]
Hexagon: Use multiclass for absolute addressing mode stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174412
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:12:06 +0000 (18:12 +0000)]
Move MRI liveouts to MSP430 return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174411
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:12:03 +0000 (18:12 +0000)]
Move MRI liveouts to Mips return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174410
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:12:00 +0000 (18:12 +0000)]
Move MRI liveouts to PowerPC return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174409
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:08:45 +0000 (18:08 +0000)]
Move MRI liveouts to MBlaze return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174408
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:08:43 +0000 (18:08 +0000)]
Move MRI liveouts to Hexagon return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174407
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:08:40 +0000 (18:08 +0000)]
Move MRI liveouts to ARM return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174406
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:04:15 +0000 (18:04 +0000)]
Add a test case for PR14750.
This was fixed by r174402.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174405
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 17:59:48 +0000 (17:59 +0000)]
Move MRI liveouts to X86 return instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174402
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 5 Feb 2013 17:55:27 +0000 (17:55 +0000)]
[MC] Bundle alignment: Invalidate relaxed fragments
Currently, when a fragment is relaxed, its size is modified, but its
offset is not (it gets laid out as a side effect of checking whether
it needs relaxation), then all subsequent fragments are invalidated
because their offsets need to change. When bundling is enabled,
relaxed fragments need to get laid out again, because the increase in
size may push it over a bundle boundary. So instead of only
invalidating subsequent fragments, also invalidate the fragment that
gets relaxed, which causes it to get laid out again.
This patch also fixes some trailing whitespace and fixes the
bundling-related debug output of MCFragments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174401
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 17:53:52 +0000 (17:53 +0000)]
Don't use MRI liveouts in R600.
Something very strange is going on with the output registers in this
target. Its ISelLowering code is inserting dangling CopyToReg nodes,
hoping that those physregs won't get clobbered before the RETURN.
This patch adds the output registers as implicit uses on RETURN
instructions in the custom emission pass. I'd much prefer to have those
CopyToReg nodes glued to the RETURNs, but I don't see how.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174400
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 5 Feb 2013 17:40:36 +0000 (17:40 +0000)]
Avoid using MRI::liveout_iterator for computing VRSAVEs.
The liveout lists are about to be removed from MRI, this is the only
place they were used after register allocation.
Get the live out V registers directly from the return instructions
instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174399
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 5 Feb 2013 17:29:03 +0000 (17:29 +0000)]
Set the deployment target for Apple llvmCore builds. <rdar://problem/
12712431>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174397
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 5 Feb 2013 17:10:07 +0000 (17:10 +0000)]
Format comments & clean whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174396
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 5 Feb 2013 17:09:16 +0000 (17:09 +0000)]
R600: Fold remaining CONST_COPY after expand pseudo inst
Patch by: Vincent Lejeune
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174395
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 5 Feb 2013 17:09:14 +0000 (17:09 +0000)]
R600: improve inputs/interpolation handling
Use one intrinsic for all sorts of interpolation.
Use two separate unexpanded instructions to represent INTERP_XY and _ZW -
this will allow to eliminate one part if it's not used.
Track liveness of special interpolation regs instead of reserving them -
this will allow to reuse those regs, lowering reg pressure.
Patch By: Vadim Girlin
v2[Vincent Lejeune]: Rebased against current llvm master
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174394
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 5 Feb 2013 17:09:13 +0000 (17:09 +0000)]
R600: Add tests for instruction predicates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174393
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 5 Feb 2013 17:09:11 +0000 (17:09 +0000)]
R600: Emit function name in the AsmPrinter
Emitting the function name allows us to check for it in the FileCheck
tests so we can make sure FileCheck is checking the output of the
correct function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174392
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 5 Feb 2013 17:09:10 +0000 (17:09 +0000)]
R600/SI: Add patterns for fcos and fsin.
Fixes 37 piglit tests and allows e.g. FlightGear to run with radeonsi.
Patch by: Michel Dänzer
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174391
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 5 Feb 2013 16:53:11 +0000 (16:53 +0000)]
Fix comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174390
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 5 Feb 2013 16:42:24 +0000 (16:42 +0000)]
Hexagon: Add V4 compare instructions. Enable relationship mapping
for the existing instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174389
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 5 Feb 2013 16:40:22 +0000 (16:40 +0000)]
Fix comment formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174388
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 5 Feb 2013 16:40:06 +0000 (16:40 +0000)]
Fix signed-unsigned comparison warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174387
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Tue, 5 Feb 2013 15:41:27 +0000 (15:41 +0000)]
Support: ensure proper state in ErrorOr copy ctors before calling 'get'
Some paths through the copy constructors for 'ErrorOr' were calling
'get' when 'HasError' and 'IsValid' were not properly initialized.
Depending on what happened to be in memory for those member variables
the asserts in 'get' might incorrectly fire. Fixed by ensuring that
the member variables in question are always initialized before calling
'get'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174381
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 5 Feb 2013 15:32:16 +0000 (15:32 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174380
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 5 Feb 2013 15:32:10 +0000 (15:32 +0000)]
llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll: "-debug" requires +Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174379
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 5 Feb 2013 15:08:02 +0000 (15:08 +0000)]
Loop Vectorizer: Handle pointer stores/loads in getWidestType()
In the loop vectorizer cost model, we used to ignore stores/loads of a pointer
type when computing the widest type within a loop. This meant that if we had
only stores/loads of pointers in a loop we would return a widest type of 8bits
(instead of 32 or 64 bit) and therefore a vector factor that was too big.
Now, if we see a consecutive store/load of pointers we use the size of a pointer
(from data layout).
This problem occured in SingleSource/Benchmarks/Shootout-C++/hash.cpp (reduced
test case is the first test in vector_ptr_load_store.ll).
radar://
13139343
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174377
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 5 Feb 2013 15:01:51 +0000 (15:01 +0000)]
Fix remaining StringRef abuse.
This should fix the valgrind buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174375
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 5 Feb 2013 14:44:16 +0000 (14:44 +0000)]
Revert r174343, "When the target-independent DAGCombiner inferred a higher alignment for a load,"
It caused hangups in compiling clang/lib/Parse/ParseDecl.cpp and clang/lib/Driver/Tools.cpp in stage2 on some hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174374
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Tue, 5 Feb 2013 14:18:59 +0000 (14:18 +0000)]
Link .ARM.exidx with corresponding text section.
The sh_link in the ELF section header of .ARM.exidx should
be filled with the section index of the corresponding text
section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174372
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 5 Feb 2013 14:05:55 +0000 (14:05 +0000)]
ARM cost model: Cost for scalar integer casts and floating point conversions
Also adds some costs for vector integer float conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174371
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 5 Feb 2013 13:24:56 +0000 (13:24 +0000)]
Fix formatting in AArch64 backend.
This should fix three purely whitespace issues:
+ 80 column violations.
+ Tab characters.
+ TableGen brace placement.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174370
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 5 Feb 2013 13:24:47 +0000 (13:24 +0000)]
Remove cyclic dependency in AArch64 libraries
This moves the bit twiddling and string fiddling functions required by other
parts of the backend into a separate library. Previously they resided in
AArch64Desc, which created a circular dependency between various components.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174369
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 5 Feb 2013 09:30:03 +0000 (09:30 +0000)]
This patch that sets the Mips ELF header flag for
MicroMips architectures.
Contributer: Zoran Jovanovic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174360
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 5 Feb 2013 08:32:10 +0000 (08:32 +0000)]
This patch that sets the EmitAlias flag in td files
and enables the instruction printer to print aliased
instructions.
Due to usage of RegisterOperands a change in common
code (utils/TableGen/AsmWriterEmitter.cpp) is required
to get the correct register value if it is a RegisterOperand.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174358
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 5 Feb 2013 08:22:27 +0000 (08:22 +0000)]
[Support][ErrorOr] Add support for convertable types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174357
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 5 Feb 2013 08:09:32 +0000 (08:09 +0000)]
Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174356
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 5 Feb 2013 08:01:22 +0000 (08:01 +0000)]
Changed in comment cxx -> C++. Thanks Richard Smith!.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174355
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 5 Feb 2013 07:47:41 +0000 (07:47 +0000)]
This patch changes a static_cast to dyn_cast
for MipsELFStreamer objects.
Contributer: Jack Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174354
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 5 Feb 2013 07:32:03 +0000 (07:32 +0000)]
Construct a skeleton cu for each compile unit in the module, not just
for the first compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174352
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 5 Feb 2013 07:32:00 +0000 (07:32 +0000)]
Add support for testing the output of the abbrev table for the
skeleton CU as part of the DWARF5 split dwarf proposal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174351
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 5 Feb 2013 07:31:55 +0000 (07:31 +0000)]
Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174350
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 5 Feb 2013 07:19:31 +0000 (07:19 +0000)]
Use the do-while(0) thing for this #define.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174347
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 5 Feb 2013 07:01:34 +0000 (07:01 +0000)]
Print error messages from MemoryBuffer::getFile() in llvm-symbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174346
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 5 Feb 2013 06:53:26 +0000 (06:53 +0000)]
Add code to GlobalVariable.h so that global variables marked as
externally_initialized return false for hasDefiniteInitializer and
hasUniqueInitializer.
rdar://
12580965.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174345
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 5 Feb 2013 06:25:30 +0000 (06:25 +0000)]
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment. However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.
This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174343
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 5 Feb 2013 05:57:38 +0000 (05:57 +0000)]
Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword externally_initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174340
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 4 Feb 2013 23:45:08 +0000 (23:45 +0000)]
[Stack Alignment] emit warning instead of a hard error
Per discussion in rdar://
13127907, we should emit a hard error only if
people write code where the requested alignment is larger than achievable
and assumes the low bits are zeros. A warning should be good enough when
we are not sure if the source code assumes the low bits are zeros.
rdar://
13127907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174336
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 4 Feb 2013 23:32:23 +0000 (23:32 +0000)]
Initial cleanups of the param-attribute code in the bitcode reader/writer.
Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced
by another encoding. Keep around the current LLVM attribute encoder/decoder
code, but move it to the bitcode directories so that no one's tempted to use
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174335
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 4 Feb 2013 15:55:26 +0000 (15:55 +0000)]
Replace global std::string with const char[]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174332
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Mon, 4 Feb 2013 15:52:56 +0000 (15:52 +0000)]
Hexagon: Add V4 combine instructions and some more Def Pats for V2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174331
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Feb 2013 15:52:32 +0000 (15:52 +0000)]
Disable a couple more vector splat optimizations on PPC.
I didn't see those because the test case used "not grep". FileCheck the test and
XFAIL it, preserving the old optimization, so this can be fixed eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174330
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Feb 2013 15:44:38 +0000 (15:44 +0000)]
Fix some abuses of StringRef
We were taking a StringRef to a temporary result, which can go horribly wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174328
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Feb 2013 15:19:33 +0000 (15:19 +0000)]
X86: Open up some opportunities for constant folding by postponing shift lowering.
Fixes PR15141.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174327
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Feb 2013 15:19:25 +0000 (15:19 +0000)]
X86: Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174326
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Feb 2013 15:19:18 +0000 (15:19 +0000)]
SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.
This required disabling a PowerPC optimization that did the following:
input:
x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16>
lowered to:
tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8>
x = ADD tmp, tmp
The add now gets folded immediately and we're back at the BUILD_VECTOR we
started from. I don't see a way to fix this currently so I left it disabled
for now.
Fix some trivially foldable X86 tests too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174325
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Feb 2013 14:14:58 +0000 (14:14 +0000)]
Give explicit suffix to integer constant over 32-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174324
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Feb 2013 12:32:21 +0000 (12:32 +0000)]
Enable AArch64 as a target built by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174322
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Feb 2013 12:15:00 +0000 (12:15 +0000)]
Update debugging test for change in expected metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174321
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 4 Feb 2013 10:24:58 +0000 (10:24 +0000)]
Coding standards: don't use ``inline`` when defining a function in a class
definition
Current practice is not to use 'inline' in:
class Foo {
public:
inline void bar() {
// ...
}
};
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174317
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Mon, 4 Feb 2013 08:15:53 +0000 (08:15 +0000)]
Pass CPPFLAGS/CFLAGS/CXXFLAGS from the environment of configure to
Makefile.config.
This is implied at the bottom of the help text of configure (besides
CC/CXX/LDFLAGS, already passed to Makefile.config).
For backward compatibility, the values of CFLAGS and CXXFLAGS defaults
to empty, overriding the default values provided by autoconf (for
example, '-g -O2' when CC=gcc').
$(CPP) is not used by our makefiles. Therefore, the value of CPP is
not passed to Makefile.config, despite beeing mentioned by 'configure
--help'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174313
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 4 Feb 2013 07:03:24 +0000 (07:03 +0000)]
More MSan/ASan annotations.
This change lets us bootstrap LLVM/Clang under ASan and MSan. It contains
fixes for 2 issues:
- X86JIT reads return address from stack, which MSan does not know is
initialized.
- bugpoint tests run binaries with RLIMIT_AS. This does not work with certain
Sanitizers.
We are no longer including config.h in Compiler.h with this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174306
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 4 Feb 2013 05:56:36 +0000 (05:56 +0000)]
[DebugInfo] remove more node indirection (this time from the subprogram's variable lists)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174305
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 4 Feb 2013 05:31:37 +0000 (05:31 +0000)]
PR15149: crash when printing debug info metadata containing an invalid language spec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174304
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 4 Feb 2013 03:22:00 +0000 (03:22 +0000)]
Removed reference to LLVM as a project (since in LangRef it is used solely as a reference to the IR). Thanks silvas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174301
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 4 Feb 2013 02:52:05 +0000 (02:52 +0000)]
ARM cost model: Penalize insertelement into D subregisters
Swift has a renaming dependency if we load into D subregisters. We don't have a
way of distinguishing between insertelement operations of values from loads and
other values. Therefore, we are pessimistic for now (The performance problem
showed up in example 14 of gcc-loops).
radar://
13096933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174300
91177308-0d34-0410-b5e6-
96231b3b80d8
Edwin Vane [Mon, 4 Feb 2013 02:32:44 +0000 (02:32 +0000)]
Turn off uninitialized-use warnings for gcc in cmake build
Added support to the cmake build to turn off uninitialized use warnings
for gcc. This cleans the build up somewhat.
Used logic simpler than found in autoconf by making use of the fact that
although gcc won't complain about unsupported -Wno-* flags it *will*
complain about unsupported -W flags.
Reviewers: gribozavr, doug.gregor, chandlerc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174299
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 4 Feb 2013 00:47:38 +0000 (00:47 +0000)]
PPCDarwinAsmPrinter::EmitStartOfAsmFile(): Add checking range in CPUDirectives[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174298
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 4 Feb 2013 00:47:33 +0000 (00:47 +0000)]
PPCDarwinAsmPrinter::EmitStartOfAsmFile(): Add possible elements in CPUDirectives[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174297
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 3 Feb 2013 21:54:38 +0000 (21:54 +0000)]
Added instance variable/initializers/getter/setters for new keyword externally initialized to GlobalVariable. No *TRUE* functionality change.
I am going to add in the actual test cases with the actual functionality
changes in a later patch because I want to include some test cases.
To be clear when I say no *TRUE* functionality change I mean that this
patch (like it says in the title) only contains getters/setters and sets
up a default initial value of the instance variable to false so that
this patch does not affect any other uses of Global Variable.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174295
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sun, 3 Feb 2013 17:06:49 +0000 (17:06 +0000)]
Recognize aarch64 for --enable-targets as advertised.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174288
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 3 Feb 2013 13:17:11 +0000 (13:17 +0000)]
use GEP::accumulateConstantOffset() to replace custom written code to compute GEP offset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174279
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Sun, 3 Feb 2013 10:48:50 +0000 (10:48 +0000)]
[Object][Archive] Improve performance.
Improve performance of iterating over children and accessing the member file
buffer by caching the file size and moving code out to the header.
This also makes getBuffer return a StringRef instead of a MemoryBuffer. Both
fixing a memory leak and removing a malloc.
This takes getBuffer from ~10% of the time in lld to unmeasurable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174272
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Sun, 3 Feb 2013 10:48:31 +0000 (10:48 +0000)]
[Support] Add LLVM_IS_UNALIGNED_ACCESS_FAST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174271
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 3 Feb 2013 09:57:18 +0000 (09:57 +0000)]
Added new Global Variable marker ``externally_initialized'' to LangRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174270
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 3 Feb 2013 09:57:15 +0000 (09:57 +0000)]
Added clarification paragraph to LangRef's documentation of
GlobalVariable about LLVM's assumptions vis-a-vis Global Variable
initial values and Global Variable initializers.
This is in preparation for adding the new keyword
externally_initialized.
Specifically, the patch explains how LLVM optimizes global initializers
by assumign that global variables defined within the module are not
modified from their initial values before the start of the global
initializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174269
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 2 Feb 2013 05:56:24 +0000 (05:56 +0000)]
Remove the (apparently) unnecessary debug info metadata indirection.
The main lists of debug info metadata attached to the compile_unit had an extra
layer of metadata nodes they went through for no apparent reason. This patch
removes that (& still passes just as much of the GDB 7.5 test suite). If anyone
can show evidence as to why these extra metadata nodes are there I'm open to
reverting this patch & documenting why they're there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174266
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sat, 2 Feb 2013 04:07:35 +0000 (04:07 +0000)]
Start static relocation implementation for mips16.
This checkin makes hello world work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174264
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 2 Feb 2013 01:34:38 +0000 (01:34 +0000)]
Removing ssp and uwtable from the testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174259
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 2 Feb 2013 00:52:44 +0000 (00:52 +0000)]
Remove AttrBuilder::Raw().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174251
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 2 Feb 2013 00:42:06 +0000 (00:42 +0000)]
Use the AttributeSet's iterators.
Use the AttributeSet's iterators in AttrBuilder::hasAttributes() when
determining of the intersection of the AttrBuilder and AttributeSet is non-null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174250
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 2 Feb 2013 00:25:26 +0000 (00:25 +0000)]
Revert accidental commit (ran svn commit from wrong directory).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174241
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 2 Feb 2013 00:22:37 +0000 (00:22 +0000)]
This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.
Also fixes a bug in the previous patch that caused us to not mark the function
referenced just because we didn't want to mark it odr used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174240
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Sat, 2 Feb 2013 00:22:03 +0000 (00:22 +0000)]
rdar://
13126763
Fix a bug in DAGCombine. The symptom is mistakenly optimizing expression
"x + x*x" into "x * 3.0".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174239
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 2 Feb 2013 00:02:03 +0000 (00:02 +0000)]
Correct indentation for dumping LexicalScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174237
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 1 Feb 2013 23:54:37 +0000 (23:54 +0000)]
[Dwarf] avoid emitting multiple AT_const_value for static memebers.
Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.
rdar://problem/
13071590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174235
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 1 Feb 2013 23:10:09 +0000 (23:10 +0000)]
Add notes about future PowerPC features
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174232
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 1 Feb 2013 22:59:51 +0000 (22:59 +0000)]
LLVM enablement for some older PowerPC CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174230
91177308-0d34-0410-b5e6-
96231b3b80d8