NAKAMURA Takumi [Sun, 18 Aug 2013 02:46:21 +0000 (02:46 +0000)]
Makefile.rules: Simplify nested if(s) on OmitFramePointer.
llvm-svn: 188619
Chandler Carruth [Sun, 18 Aug 2013 01:55:15 +0000 (01:55 +0000)]
Port the detection of zlib from the main autoconf system to the sample
project's autoconf. This is the last of the missing optional checks used
by libSupport that seemed to be missing from the sample project, but
I could easily have missed some as this was done by inspection when
Craig asked me to add the terminfo support.
llvm-svn: 188618
Chandler Carruth [Sun, 18 Aug 2013 01:46:34 +0000 (01:46 +0000)]
Add support for linking librt and using clock_gettime to the sample
autoconf setup.
llvm-svn: 188617
Chandler Carruth [Sun, 18 Aug 2013 01:43:57 +0000 (01:43 +0000)]
Update the sample project autoconf setup to include support for
detecting terminfo. Requested by Craig Topper, and probably should be
done much more systematically.
llvm-svn: 188616
Chandler Carruth [Sun, 18 Aug 2013 01:20:32 +0000 (01:20 +0000)]
Go through the really awkward dance required to delete the memory
allocated by setupterm. Without this, some folks are seeing leaked
memory whenever this routine is called more than once. Thanks to Craig
Topper for the report.
llvm-svn: 188615
Hal Finkel [Sun, 18 Aug 2013 00:16:23 +0000 (00:16 +0000)]
Fix SCEVExpander creating distinct duplicate PHI entries
This fixes SCEVExpander so that it does not create multiple distinct induction
variables for duplicate PHI entries. Specifically, given some code like this:
do.body6: ; preds = %do.body6, %do.body6, %if.then5
%end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ]
...
Note that it is legal to have multiple entries for a basic block so long as the
associated value is the same. So the above input is okay, but expanding an
AddRec in this loop could produce code like this:
do.body6: ; preds = %do.body6, %do.body6, %if.then5
%indvar = phi i64 [ %indvar.next, %do.body6 ], [ %indvar.next1, %do.body6 ], [ 0, %if.then5 ]
%end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ]
...
%indvar.next = add i64 %indvar, 1
%indvar.next1 = add i64 %indvar, 1
And this is not legal because there are two PHI entries for %do.body6 each with
a distinct value.
Unfortunately, I don't have an in-tree test case.
llvm-svn: 188614
Joerg Sonnenberger [Sat, 17 Aug 2013 22:32:10 +0000 (22:32 +0000)]
Fix endian conditions on Solaris. From Alexander Esilevich.
llvm-svn: 188613
David Blaikie [Sat, 17 Aug 2013 20:01:53 +0000 (20:01 +0000)]
PR16927: Don't assert (or, previously, skip) static data members of enumeration type
llvm-svn: 188612
Guillaume Papin [Sat, 17 Aug 2013 19:04:56 +0000 (19:04 +0000)]
Revert "cpp11-migrate: Add a class to support include directives modifications"
This reverts commit r188610.
Issue with the absolute include paths not found in the unit tests on the Windows
bots. Needs investigation.
llvm-svn: 188611
Guillaume Papin [Sat, 17 Aug 2013 18:48:31 +0000 (18:48 +0000)]
cpp11-migrate: Add a class to support include directives modifications
The IncludeDirectives class helps with detecting and modifying #include
directives. For now it allows the users to add angled-includes in a source file.
This is a start for this class that will evolve in the future to add more
functionality.
llvm-svn: 188610
Juergen Ributzka [Sat, 17 Aug 2013 16:40:09 +0000 (16:40 +0000)]
Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.
This fixes bug PR 16581 and rdar:
14747994.
llvm-svn: 188609
Juergen Ributzka [Sat, 17 Aug 2013 16:38:37 +0000 (16:38 +0000)]
The vbroadcastsi256 intrinsic does not exactly resemble the GCC
builtin. The GCC builtin expects the arguments to be passed by val,
whereas the LLVM intrinsic expects a pointer instead.
This is related to PR 16581 and rdar:
14747994.
llvm-svn: 188608
Anton Yartsev [Sat, 17 Aug 2013 15:43:19 +0000 (15:43 +0000)]
+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys perl ports.
llvm-svn: 188607
Joerg Sonnenberger [Sat, 17 Aug 2013 11:06:00 +0000 (11:06 +0000)]
Recognize NetBSD's terminfo implementation.
llvm-svn: 188606
Joerg Sonnenberger [Sat, 17 Aug 2013 11:04:47 +0000 (11:04 +0000)]
PR 16899: Do not modify the basic block using the iterator, but keep the
next value. This avoids crashes due to invalidation.
Patch by Joey Gouly.
llvm-svn: 188605
Jason Molenda [Sat, 17 Aug 2013 03:39:52 +0000 (03:39 +0000)]
Follow-up to the checkin of r188532 -- make sure that
we've read the ObjectFile's Symtab before we change the
File addresses in the Sections.
llvm-svn: 188604
Richard Smith [Sat, 17 Aug 2013 00:51:11 +0000 (00:51 +0000)]
Fix indentation.
llvm-svn: 188603
Richard Smith [Sat, 17 Aug 2013 00:46:16 +0000 (00:46 +0000)]
Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.
llvm-svn: 188602
Argyrios Kyrtzidis [Sat, 17 Aug 2013 00:40:41 +0000 (00:40 +0000)]
Rename libIDE to libIndex.
Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.
llvm-svn: 188601
David Blaikie [Sat, 17 Aug 2013 00:06:55 +0000 (00:06 +0000)]
Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"
This reverts commit r188576.
Reverting while I investigate a selfhosting buildbot failure on Darwin.
llvm-svn: 188600
Tom Stellard [Sat, 17 Aug 2013 00:06:51 +0000 (00:06 +0000)]
R600: Fix possible use of an uninitialized variable
Spotted by Nick Lewycky!
llvm-svn: 188599
Tom Stellard [Fri, 16 Aug 2013 23:51:33 +0000 (23:51 +0000)]
R600: Expand vector FRINT ops
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188598
Tom Stellard [Fri, 16 Aug 2013 23:51:29 +0000 (23:51 +0000)]
R600: Expand vector FFLOOR ops
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188597
Tom Stellard [Fri, 16 Aug 2013 23:51:24 +0000 (23:51 +0000)]
R600: Expand vector float operations for both SI and R600
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188596
Jim Grosbach [Fri, 16 Aug 2013 23:37:40 +0000 (23:37 +0000)]
ARM: Properly constrain comparison fastisel register classes.
Ongoing 'make the verifier happy' improvements to ARM fast-isel.
rdar://
12594152
llvm-svn: 188595
Jim Grosbach [Fri, 16 Aug 2013 23:37:36 +0000 (23:37 +0000)]
ARM: Fast-isel register class constrain for extends.
Properly constrain the operand register class for instructions used
in [sz]ext expansion. Update more tests to use the verifier now that
we're getting the register classes correct.
rdar://
12594152
llvm-svn: 188594
Jim Grosbach [Fri, 16 Aug 2013 23:37:31 +0000 (23:37 +0000)]
ARM: Fix more fast-isel verifier failures.
Teach the generic instruction selection helper functions to constrain
the register classes of their input operands. For non-physical register
references, the generic code needs to be careful not to mess that up
when replacing references to result registers. As the comment indicates
for MachineRegisterInfo::replaceRegWith(), it's important to call
constrainRegClass() first.
rdar://
12594152
llvm-svn: 188593
Jim Grosbach [Fri, 16 Aug 2013 23:37:23 +0000 (23:37 +0000)]
ARM: Clean up fast-isel machine verifier errors.
Lots of machine verifier errors result from using a plain GPR regclass
for incoming argument copies. A more restrictive rGPR class is more
appropriate since it more accurately represents what's happening, plus
it lines up better with isel later on so the verifier is happier.
Reduces the number of ARM fast-isel tests not running with the verifier
enabled by over half.
rdar://
12594152
llvm-svn: 188592
Fariborz Jahanian [Fri, 16 Aug 2013 23:35:05 +0000 (23:35 +0000)]
ObjectiveC migrator: Add some more routines
for future work. No change otherwise.
llvm-svn: 188591
Daniel Dunbar [Fri, 16 Aug 2013 23:30:23 +0000 (23:30 +0000)]
[lit] Rewrite TODO list, and elaborate on some things.
- If anyone is interested in lit's feature set, I'd appreciate any comments on
the elaborated items.
llvm-svn: 188590
Daniel Dunbar [Fri, 16 Aug 2013 23:30:19 +0000 (23:30 +0000)]
[typo] An LLVM.
llvm-svn: 188589
Rafael Espindola [Fri, 16 Aug 2013 23:18:50 +0000 (23:18 +0000)]
Don't reject attribute used in an "extern const" variable definition.
Before this patch we would warn and drop the attribute in
extern const char test3[] __attribute__((used)) = "";
llvm-svn: 188588
Ted Kremenek [Fri, 16 Aug 2013 23:14:22 +0000 (23:14 +0000)]
Use the number of parameters in the actual method or function to determine the CallEffects size.
llvm-svn: 188587
Reed Kotler [Fri, 16 Aug 2013 23:05:18 +0000 (23:05 +0000)]
Fix a subtle difference between running clang vs llc for mips16.
This regards how mips16 is viewed. It's not really a target type but
there has always been a target for it in the td files. It's more properly
-mcpu=mips32 -mattr=+mips16 . This is how clang treats it but we have
always had the -mcpu=mips16 which I probably should delete now but it will
require updating all the .ll test cases for mips16. In this case it changed
how we decide if we have a count bits instruction and whether instruction
lowering should then expand ctlz. Now that we have dual mode compilation,
-mattr=+mips16 really just indicates the inital processor mode that
we are compiling for. (It is also possible to have -mcpu=64 -mattr=+mips16
but as far as I know, nobody has even built such a processor, though there
is an architecture manual for this).
llvm-svn: 188586
David Blaikie [Fri, 16 Aug 2013 22:52:07 +0000 (22:52 +0000)]
DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines
Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.
llvm-svn: 188585
Reid Kleckner [Fri, 16 Aug 2013 22:42:42 +0000 (22:42 +0000)]
Actually, use GNU inline asm for cpuid with clang
Clang doesn't support the MSVC __cpuid intrinsic yet, and fixing that is
blocked on some fairly complicated issues.
llvm-svn: 188584
Chris Lattner [Fri, 16 Aug 2013 22:29:44 +0000 (22:29 +0000)]
I'm told that != is not ==
llvm-svn: 188583
Chris Lattner [Fri, 16 Aug 2013 22:09:02 +0000 (22:09 +0000)]
allow != to compare PointerUnion, we already support ==.
llvm-svn: 188582
Benjamin Kramer [Fri, 16 Aug 2013 21:57:14 +0000 (21:57 +0000)]
RetainCountChecker: Replace some loops with std:: algorithms.
llvm-svn: 188581
Benjamin Kramer [Fri, 16 Aug 2013 21:57:06 +0000 (21:57 +0000)]
Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.
llvm-svn: 188580
Benjamin Kramer [Fri, 16 Aug 2013 21:55:56 +0000 (21:55 +0000)]
Add difference_type to ImmutableMap/Set iterators so they have a complete set of typedefs.
llvm-svn: 188579
Ted Kremenek [Fri, 16 Aug 2013 21:54:22 +0000 (21:54 +0000)]
Revert r188574. Turns out it isn't needed.
llvm-svn: 188578
David Blaikie [Fri, 16 Aug 2013 20:42:14 +0000 (20:42 +0000)]
DebugInfo: Allow the addition of other (such as static data) members to a record type after construction
Plus a type cleanup & minor fix to enumerate members of declarations.
llvm-svn: 188577
David Blaikie [Fri, 16 Aug 2013 20:40:29 +0000 (20:40 +0000)]
DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class
This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.
llvm-svn: 188576
David Blaikie [Fri, 16 Aug 2013 20:40:25 +0000 (20:40 +0000)]
DebugInfo: Contrain the record type parameter for CollectRecordFields
This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.
llvm-svn: 188575
Fariborz Jahanian [Fri, 16 Aug 2013 20:23:36 +0000 (20:23 +0000)]
Need summary info. about arguments to
CF functions coming from static analyzer API.
llvm-svn: 188574
Bill Schmidt [Fri, 16 Aug 2013 20:05:04 +0000 (20:05 +0000)]
[PowerPC] Preparatory refactoring for making prologue and epilogue
safe on PPC32 SVR4 ABI
[Patch and following text by Mark Minich; committing on his behalf.]
There are FIXME's in PowerPC/PPCFrameLowering.cpp, method
PPCFrameLowering::emitPrologue() related to "negative offsets of R1"
on PPC32 SVR4. They're true, but the real issue is that on PPC32 SVR4
(and any ABI without a Red Zone), no spills may be made until after
the stackframe is claimed, which also includes the LR spill which is
at a positive offset. The same problem exists in emitEpilogue(),
though there's no FIXME for it. I intend to fix this issue, making
LLVM-compiled code finally safe for use on SVR4/EABI/e500 32-bit
platforms (including in particular, OS-free embedded systems & kernel
code, where interrupts may share the same stack as user code).
In preparation for making these changes, to make the diffs for the
functional changes less cluttered, I am providing the non-functional
refactorings in two stages:
Stage 1 does some minor fluffy refactorings to pull multiple method
calls up into a single bool, creating named bools for repeated uses of
obscure logic, moving some code up earlier because either stage 2 or
my final version will require it earlier, and rewording/adding some
comments. My stage 1 changes can be characterized as primarily fluffy
cleanup, the purpose of which may be unclear until the stage 2 or
final changes are made.
My stage 2 refactorings combine the separate PPC32 & PPC64 logic,
which is currently performed by largely duplicate code, into a single
flow, with the differences handled by a group of constants initialized
early in the methods.
This submission is for my stage 1 changes. There should be no
functional changes whatsoever; this is a pure refactoring.
llvm-svn: 188573
Richard Mitton [Fri, 16 Aug 2013 18:54:26 +0000 (18:54 +0000)]
Fixed RuntimeDyldELF absolute relocations.
If an ELF relocation is pointed at an absolute address, it will have a symbol ID of zero.
RuntimeDyldELF::processRelocationRef was not previously handling this case, and was instead trying to handle it as a section-relative fixup.
I think this is the right fix here, but my elf-fu is poor on some of the more exotic platforms, so I'd appreciate it if anyone with greater knowledge could verify this.
llvm-svn: 188572
DeLesley Hutchins [Fri, 16 Aug 2013 18:28:00 +0000 (18:28 +0000)]
Thread safety analysis: new test case
llvm-svn: 188571
Richard Mitton [Fri, 16 Aug 2013 18:18:31 +0000 (18:18 +0000)]
Test commit.
llvm-svn: 188570
Argyrios Kyrtzidis [Fri, 16 Aug 2013 18:17:55 +0000 (18:17 +0000)]
Introduce the clangIDE library.
Libclang has a lot of functionality that is inaccessible.
The purpose of clangIDE is to move most of the functionality of libclang to it so we
can expose it and have libclang be more of a thin C wrapper over clangIDE.
Start by moving the USR generation functionality into clangIDE.
llvm-svn: 188569
Richard Mitton [Fri, 16 Aug 2013 18:09:06 +0000 (18:09 +0000)]
Test commit.
llvm-svn: 188568
Daniel Dunbar [Fri, 16 Aug 2013 18:01:18 +0000 (18:01 +0000)]
[tests] Another attempt to workaround broken misched-copy.s test on some buildbots.
llvm-svn: 188567
Aaron Ballman [Fri, 16 Aug 2013 17:53:28 +0000 (17:53 +0000)]
Switching to using a helper function instead of manually converting the string to UTF-8.
llvm-svn: 188566
Aaron Ballman [Fri, 16 Aug 2013 17:33:57 +0000 (17:33 +0000)]
Removing unused functionality.
llvm-svn: 188565
Stephen Lin [Fri, 16 Aug 2013 17:29:01 +0000 (17:29 +0000)]
FileCheck: Fix stray quote in CHECK-LABEL error message.
llvm-svn: 188564
Jim Grosbach [Fri, 16 Aug 2013 17:03:36 +0000 (17:03 +0000)]
InstCombine: Use isAllOnesValue() instead of explicit -1.
llvm-svn: 188563
Rafael Espindola [Fri, 16 Aug 2013 16:46:27 +0000 (16:46 +0000)]
clang-format utils/TableGen/TableGen.cpp.
I have a patch that edits the file. Running clang-format first makes the patch
a lot easier to review.
llvm-svn: 188562
Samuel Benzaquen [Fri, 16 Aug 2013 16:19:42 +0000 (16:19 +0000)]
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1402
llvm-svn: 188560
Michel Danzer [Fri, 16 Aug 2013 16:19:31 +0000 (16:19 +0000)]
R600/SI: Add pattern for xor of i1
Fixes two recent piglit regressions with radeonsi.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188559
Michel Danzer [Fri, 16 Aug 2013 16:19:24 +0000 (16:19 +0000)]
R600/SI: Fix broken encoding of DS_WRITE_B32
The logic in SIInsertWaits::getHwCounts() only really made sense for SMRD
instructions, and trying to shoehorn it into handling DS_WRITE_B32 caused
it to corrupt the encoding of that by clobbering the first operand with
the second one.
Undo that damage and only apply the SMRD logic to that.
Fixes some derivates related piglit regressions with radeonsi.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188558
Daniel Sanders [Fri, 16 Aug 2013 15:27:12 +0000 (15:27 +0000)]
Reverted test commit (r188556)
llvm-svn: 188557
Daniel Sanders [Fri, 16 Aug 2013 15:26:36 +0000 (15:26 +0000)]
Test commit. Just a blank line
llvm-svn: 188556
Benjamin Kramer [Fri, 16 Aug 2013 14:48:09 +0000 (14:48 +0000)]
R600: Allocate memoperand in the MachienFunction so it doesn't leak.
llvm-svn: 188555
Aaron Ballman [Fri, 16 Aug 2013 14:33:07 +0000 (14:33 +0000)]
Updating function comments; no functional changes intended.
llvm-svn: 188554
Aaron Ballman [Fri, 16 Aug 2013 13:42:41 +0000 (13:42 +0000)]
Passing false instead of 0; no functional change intended.
llvm-svn: 188553
Aaron Ballman [Fri, 16 Aug 2013 13:34:39 +0000 (13:34 +0000)]
Passing false instead of 0; no functional change intended.
llvm-svn: 188552
Benjamin Kramer [Fri, 16 Aug 2013 12:52:08 +0000 (12:52 +0000)]
When initializing the PIC global base register on ARM/ELF add pc to fix the address.
This unbreaks PIC with fast isel on ELF targets (PR16717). The output matches
what GCC and SDag do for PIC but may not cover all of the many flavors of PIC
that exist.
llvm-svn: 188551
Edwin Vane [Fri, 16 Aug 2013 12:18:53 +0000 (12:18 +0000)]
Tweak Replacement comparisons
* Introduce operator< to replace Replacement::Less
* Make operator== and operator< on Replacements non-member functions
* Change order of comparisons in operator< to do string comparisons last
llvm-svn: 188550
Mihai Popa [Fri, 16 Aug 2013 12:03:00 +0000 (12:03 +0000)]
Add support for Thumb2 literal loads with negative zero offset
Thumb2 literal loads use an offset encoding which allows for
negative zero. This fixes parsing and encoding so that #-0
is correctly processed. The parser represents #-0 as INT32_MIN.
llvm-svn: 188549
Mihai Popa [Fri, 16 Aug 2013 11:55:44 +0000 (11:55 +0000)]
Fix Thumb2 aliasing complementary instructions taking modified immediates
There are many Thumb instructions which take 12-bit immediates encoded in a special
8-byte value + 4-byte rotator form. Not all numbers are represented, and it's legal
to transform an assembly instruction to be able to encode the immediate.
For example: AND and BIC are complementary instructions; one can switch the AND
to a BIC as long as the immediate is complemented.
The intent is to switch one instruction into its complementary one when the immediate
cannot be encoded in the form requested in the original assembly and when the
complementary immediate is encodable.
The patch addresses two issues:
1. definition of t2SOImmNot immediate - it has to check that the orignal value is
not encoded naturally
2. t2AND and t2BIC instruction aliases which should use the Thumb2 SOImm operand
rather than the ARM one.
llvm-svn: 188548
Richard Sandiford [Fri, 16 Aug 2013 11:41:43 +0000 (11:41 +0000)]
[SystemZ] Use SRST to implement strlen and strnlen
It would also make sense to use it for memchr; I'm working on that now.
llvm-svn: 188547
Richard Sandiford [Fri, 16 Aug 2013 11:29:37 +0000 (11:29 +0000)]
[SystemZ] Use MVST to implement strcpy and stpcpy
llvm-svn: 188546
Timur Iskhodzhanov [Fri, 16 Aug 2013 11:26:26 +0000 (11:26 +0000)]
[ASan/RTL] Disable colored reporting on Windows
llvm-svn: 188545
Richard Sandiford [Fri, 16 Aug 2013 11:21:54 +0000 (11:21 +0000)]
[SystemZ] Use CLST to implement strcmp
llvm-svn: 188544
Daniel Jasper [Fri, 16 Aug 2013 11:20:30 +0000 (11:20 +0000)]
Split UnwrappedLineFormatter into individual components.
Goals: Structure code better and make components easier to use for
future features (e.g. column layout for long braced initializers).
No functional changes intended.
llvm-svn: 188543
Dmitry Vyukov [Fri, 16 Aug 2013 11:15:14 +0000 (11:15 +0000)]
tsan: better report formatting for Go
Say that gorotuine 1 is main goroutine.
Remove excessive new line.
llvm-svn: 188542
Timur Iskhodzhanov [Fri, 16 Aug 2013 11:04:59 +0000 (11:04 +0000)]
[ASan/RTL] Disable alloc_dealloc_mismatch by default on Windows
llvm-svn: 188541
Richard Sandiford [Fri, 16 Aug 2013 10:55:47 +0000 (10:55 +0000)]
[SystemZ] Fix handling of 64-bit memcmp results
Generalize r188163 to cope with return types other than MVT::i32, just
as the existing visitMemCmpCall code did. I've split this out into a
subroutine so that it can be used for other upcoming patches.
I also noticed that I'd used the wrong API to record the out chain.
It's a load that uses DAG.getRoot() rather than getRoot(), so the out
chain should go on PendingLoads. I don't have a testcase for that because
we don't do any interesting scheduling on z yet.
llvm-svn: 188540
Evgeniy Stepanov [Fri, 16 Aug 2013 10:35:31 +0000 (10:35 +0000)]
Revert r188498.
This change broke release+asserts build with compiler-rt.
llvm-svn: 188539
Richard Sandiford [Fri, 16 Aug 2013 10:22:54 +0000 (10:22 +0000)]
[SystemZ] Fix sign of integer memcmp result
r188163 used CLC to implement memcmp. Code that compares the result
directly against zero can test the CC value produced by CLC, but code
that needs an integer result must use IPM. The sequence I'd used was:
ipm <reg>
sll <reg>, 2
sra <reg>, 30
but I'd forgotten that this inverts the order, so that CC==1 ("less")
becomes an integer greater than zero, and CC==2 ("greater") becomes
an integer less than zero. This sequence should only be used if the
CLC arguments are reversed to compensate. The problem then is that
the branch condition must also be reversed when testing the CLC
result directly.
Rather than do that, I went for a different sequence that works with
the natural CLC order:
ipm <reg>
srl <reg>, 28
rll <reg>, <reg>, 31
One advantage of this is that it doesn't clobber CC. A disadvantage
is that any sign extension to 64 bits must be done separately,
rather than being folded into the shifts.
llvm-svn: 188538
Vladimir Medic [Fri, 16 Aug 2013 10:17:03 +0000 (10:17 +0000)]
This patch implements wait instruction for mips. Examples are added in test files.
llvm-svn: 188537
David Majnemer [Fri, 16 Aug 2013 08:29:13 +0000 (08:29 +0000)]
Parse: Do not 'HandleTopLevelDecl' on templated functions.
Summary:
HandleTopLevelDecl on a templated function leads us to try and mangle
it.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1412
llvm-svn: 188536
Ted Kremenek [Fri, 16 Aug 2013 06:22:23 +0000 (06:22 +0000)]
Fix typo pointed out by Jordan.
llvm-svn: 188535
Craig Topper [Fri, 16 Aug 2013 06:07:34 +0000 (06:07 +0000)]
Don't use v16i32 for load pattern matching. All 512-bit loads are cated to v8i64.
llvm-svn: 188534
Ariel J. Bernal [Fri, 16 Aug 2013 04:40:44 +0000 (04:40 +0000)]
Use -std=c++11 when no compilation database is provided
Allow the migrator to be used without specifing --. If neither -- nor -p is
provided and no compilation database can be detecteded from the first source
file path then -std=c++11 is added as the only compiler argument.
llvm-svn: 188533
Jason Molenda [Fri, 16 Aug 2013 03:20:42 +0000 (03:20 +0000)]
Add a new Section::SetFileAddress method to change a Section's file
address.
When loading a dSYM, and the file addresses of the dSYM Sections are
different than the executable binary Sections' file addresses, the
debug info won't be remapped to the actual load addresses correctly.
This only happens with binaries on the in-memory shared cache binaries
where their File addresses have been set to their actual load address
(outside an offset value) whereas the original executable and dSYM
have 0-based File addresses.
I think this patch will not be activated for other cases -- this is
the only case we know of where the dSYM and the executable's File
addresses differ -- but if this causes other problems we can restrict
it more carefully.
<rdar://problem/
12335086>
llvm-svn: 188532
Hans Wennborg [Fri, 16 Aug 2013 03:15:10 +0000 (03:15 +0000)]
Windows ToolChain: add VS bin dir to PogramPaths
We have a lot of fancy logic to find Visual Studio, which is currently used
to set the system header include paths.
Use the same code to set the ProgramPaths, which is used for finding programs
such as link.exe. Previously, Clang would just search PATH for link.exe,
but now it should find it if it's able to find Visual Studio.
Differential Revision: http://llvm-reviews.chandlerc.com/D1417
llvm-svn: 188531
Aaron Ballman [Fri, 16 Aug 2013 03:06:38 +0000 (03:06 +0000)]
Re-disabling C4291 warnings for MSVC because AttributeList.h requires it. This was accidentally removed in r187279.
llvm-svn: 188530
Matt Arsenault [Fri, 16 Aug 2013 02:59:17 +0000 (02:59 +0000)]
Add missing test for GEP + bitcast transformation
llvm-svn: 188529
Aaron Ballman [Fri, 16 Aug 2013 02:56:43 +0000 (02:56 +0000)]
Calling the base class constructor from the derived class' initializer list. This matches DenseMap's behavior, and silences some warnings.
llvm-svn: 188528
Daniel Dunbar [Fri, 16 Aug 2013 02:54:00 +0000 (02:54 +0000)]
[tests] Add a hack to eliminate some dangling .s files on buildbots.
- Benjamin fixed the emission of this file in r179937, but it still lives on a
few buildbots. We should probably clean up the build dirs once in a while,
eh?
llvm-svn: 188527
Daniel Dunbar [Fri, 16 Aug 2013 02:53:29 +0000 (02:53 +0000)]
[tests] Remove an out-dated failing test.
llvm-svn: 188526
Aaron Ballman [Fri, 16 Aug 2013 01:53:58 +0000 (01:53 +0000)]
Removing a spurious semi-colon; this macro expands into a namespace.
llvm-svn: 188525
Aaron Ballman [Fri, 16 Aug 2013 01:43:31 +0000 (01:43 +0000)]
Fixing a warning about control reaching the end of a non-void function.
llvm-svn: 188524
Tom Stellard [Fri, 16 Aug 2013 01:18:43 +0000 (01:18 +0000)]
Revert "R600/SI: Fix incorrect encoding of DS_WRITE_B32 instructions"
This reverts commit
a6a39ced095c2f453624ce62c4aead25db41a18f.
This is the wrong version of this fix.
llvm-svn: 188523
Tom Stellard [Fri, 16 Aug 2013 01:12:20 +0000 (01:12 +0000)]
R600/SI: Fix incorrect encoding of DS_WRITE_B32 instructions
The SIInsertWaits pass was overwriting the first operand (gds bit) of
DS_WRITE_B32 with the second operand (value to write). This meant that
any time the value to write was stored in an odd number VGPR, the gds
bit would be set causing the instruction to write to GDS instead of LDS.
llvm-svn: 188522
Tom Stellard [Fri, 16 Aug 2013 01:12:16 +0000 (01:12 +0000)]
R600: Add support for global vector loads with element types less than 32-bits
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 188521
Tom Stellard [Fri, 16 Aug 2013 01:12:11 +0000 (01:12 +0000)]
R600: Add support for global vector stores with elements less than 32-bits
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 188520
Tom Stellard [Fri, 16 Aug 2013 01:12:06 +0000 (01:12 +0000)]
R600: Add support for i16 and i8 global stores
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 188519