Richard Smith [Sat, 2 May 2015 02:08:26 +0000 (02:08 +0000)]
[modules] Remove dead code from Module for tracking macro import locations.
llvm-svn: 236376
Richard Smith [Sat, 2 May 2015 01:14:40 +0000 (01:14 +0000)]
[modules] Don't bother creating a ModuleMacro representing a #undef that overrides nothing.
llvm-svn: 236374
Eric Christopher [Sat, 2 May 2015 01:06:17 +0000 (01:06 +0000)]
Rework test to use FileCheck by making sure we have no xmm registers
with numbers.
llvm-svn: 236373
Steven Wu [Sat, 2 May 2015 00:56:15 +0000 (00:56 +0000)]
Fix -fobjc-arc doesn't work with -save-temps
The underlying problem is that there is currently no way to run
ObjCARCContract from llvm bitcode which is required by ObjC ARC.
This fix the problem by always enable ObjCARCContract pass if
optimization is enabled. The ObjCARC Contract pass has almost no
overhead on code that is not using ARC.
llvm-svn: 236372
Kaelyn Takata [Sat, 2 May 2015 00:49:18 +0000 (00:49 +0000)]
Diagnose delayed typos when parsing a postfix expression with an
unmatched l_paren before setting the LHS to ExprError().
Fixes PR23285.
llvm-svn: 236371
Justin Bogner [Sat, 2 May 2015 00:48:27 +0000 (00:48 +0000)]
InstrProf: Use a locally tracked current count in ComputeRegionCounts
No functional change. This just makes it more obvious that the logic
in ComputeRegionCounts only depends on the counter map and local
state.
llvm-svn: 236370
Richard Smith [Sat, 2 May 2015 00:45:56 +0000 (00:45 +0000)]
[modules] If a module #includes a modular header that #undef's its macro, it
should not export the macro.
... at least, not unless we have local submodule visibility enabled.
llvm-svn: 236369
Jim Grosbach [Sat, 2 May 2015 00:44:14 +0000 (00:44 +0000)]
MC: Tidy up comments and clean up formatting a bit. NFC.
llvm-svn: 236368
Jim Grosbach [Sat, 2 May 2015 00:44:07 +0000 (00:44 +0000)]
Fix spelling.
llvm-svn: 236367
Siva Chandra [Sat, 2 May 2015 00:37:12 +0000 (00:37 +0000)]
Mark the other test of TestFdLeak also as xfail to keep the bot green.
Summary:
r235916 marked only one of the tests as xfail, but the other also has
been failing intermitantly on the buildbot.
Reviewers: chaoren
Reviewed By: chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9452
llvm-svn: 236366
Justin Bogner [Fri, 1 May 2015 23:41:09 +0000 (23:41 +0000)]
InstrProf: Replace the RegionCounter class with a simpler direct approach
This removes the RegionCounter class, which is only used as a helper
in teh ComputeRegionCounts stmt visitor. This class is just an extra
layer of abstraction that makes the code harder to follow at this
point, and removing it makes the logic quite a bit more direct.
llvm-svn: 236364
Jason Molenda [Fri, 1 May 2015 23:39:48 +0000 (23:39 +0000)]
Change process kill to call Process::Destroy (force_kill = true);
follow-up to the change in r235158. Right now if you attach to
a process and type "kill", lldb doesn't kill it, it detaches.
<rdar://problem/
20691198>
llvm-svn: 236363
Enrico Granata [Fri, 1 May 2015 22:57:38 +0000 (22:57 +0000)]
Fix an issue where the UTF dumper was ignoring the direction to generate uncapped dumps
llvm-svn: 236362
Justin Bogner [Fri, 1 May 2015 22:52:48 +0000 (22:52 +0000)]
InstrProf: Add a couple of checks to this test
"Don't crash" tests are silly, we might as well check that the
counters are consistent here.
llvm-svn: 236361
Reid Kleckner [Fri, 1 May 2015 22:50:14 +0000 (22:50 +0000)]
Revert "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
This reverts commit r236359. Things are still broken despite testing. :(
llvm-svn: 236360
Reid Kleckner [Fri, 1 May 2015 22:40:25 +0000 (22:40 +0000)]
Re-land "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
This reverts commit r236340.
llvm-svn: 236359
Colin LeMahieu [Fri, 1 May 2015 22:39:20 +0000 (22:39 +0000)]
[Hexagon] r236351 fix does not work on builder configurations yet.
llvm-svn: 236358
Reid Kleckner [Fri, 1 May 2015 22:23:56 +0000 (22:23 +0000)]
Disable exceptions for clang-compiled unittest code on Windows
llvm-svn: 236357
Marshall Clow [Fri, 1 May 2015 22:14:35 +0000 (22:14 +0000)]
Found a Urbana paper that has library bits
llvm-svn: 236356
David Majnemer [Fri, 1 May 2015 21:42:19 +0000 (21:42 +0000)]
Remove some code left around for debugging purposes
llvm-svn: 236355
David Majnemer [Fri, 1 May 2015 21:35:45 +0000 (21:35 +0000)]
[MS ABI] Detect and diagnose vftables which cannot be created
The MSVC ABI has a bug introduced by appending to the end of vftables
which come from virtual bases: covariant thunks introduces via
non-overlapping regions of the inheritance lattice both append to the
same slot in the vftable.
It is possible to generate correct vftables in cases where one node in
the lattice completely dominates the other on the way to the base with
the vfptr; in all other cases, we must raise a diagnostic in order to
prevent the illusion that we succeeded in laying out the vftable.
This fixes PR16759.
llvm-svn: 236354
David Majnemer [Fri, 1 May 2015 21:35:41 +0000 (21:35 +0000)]
[MS ABI] NV bases may indirectly contain covariant thunks from V Bases
A class might contain multiple ways of getting to a vbase, some of which
are virtual and other non-virtual. It may be the case that a
non-virtual base contains an override of a method in a vbase. This
means that we must carefully pick between a set of nvbases to determine
which is the best.
As a consequence, the findPathForVPtr algorithm is considerably simpler.
llvm-svn: 236353
Quentin Colombet [Fri, 1 May 2015 21:34:57 +0000 (21:34 +0000)]
[AArch64][FastISel] Variant of the logical instructions that use two input
registers cannot write on SP.
rdar://problem/
20748715
llvm-svn: 236352
Colin LeMahieu [Fri, 1 May 2015 21:30:22 +0000 (21:30 +0000)]
[Hexagon] Removing variable unused in release.
llvm-svn: 236351
Richard Smith [Fri, 1 May 2015 21:22:17 +0000 (21:22 +0000)]
[modules] Add -fmodules-local-submodule-visibility flag.
This flag specifies that the normal visibility rules should be used even for
local submodules (submodules of the currently-being-built module). Thus names
will only be visible if a header / module that declares them has actually been
included / imported, and not merely because a submodule that happened to be
built earlier declared those names. This also removes the need to modularize
bottom-up: textually-included headers will be included into every submodule
that includes them, since their include guards will not leak between modules.
So far, this only governs visibility of macros, not of declarations, so is not
ready for real use yet.
llvm-svn: 236350
Tim Northover [Fri, 1 May 2015 21:17:25 +0000 (21:17 +0000)]
ARM: merge Cyclone into other ARMv8 CPUs and add tests for features.
Cyclone actually supports all the goodies you'd expect to come with an AArch64
CPU, so it doesn't need its own clause. Also we should probably be testing
these clauses.
llvm-svn: 236349
Colin LeMahieu [Fri, 1 May 2015 21:14:21 +0000 (21:14 +0000)]
[Hexagon] Adding expression MC emission and removing XFAIL from test that hits this code path.
llvm-svn: 236348
Kaelyn Takata [Fri, 1 May 2015 20:59:18 +0000 (20:59 +0000)]
Also correct typos in the middle of a ternary expression when the RHS is invalid.
The LHS was already being corrected before being set to ExprError when
the RHS is invalid, but when it was present the middle of a ternary
expression would be dropped in the error paths.
Fixes PR23350.
llvm-svn: 236347
Quentin Colombet [Fri, 1 May 2015 20:57:11 +0000 (20:57 +0000)]
[AArch64][FastISel] Fix the setting of kill flags for MUL -> UMULH sequences.
rdar://problem/
20748715
llvm-svn: 236346
Zachary Turner [Fri, 1 May 2015 20:51:49 +0000 (20:51 +0000)]
Fix compilation of PDBApiTest.
llvm-svn: 236345
Nick Lewycky [Fri, 1 May 2015 20:47:19 +0000 (20:47 +0000)]
Adjust the wording of the "brackets go after the unqualified-id" error message. It applies in cases that aren't unqualified-ids.
llvm-svn: 236344
Zachary Turner [Fri, 1 May 2015 20:33:10 +0000 (20:33 +0000)]
Fix build.
llvm-svn: 236343
Zachary Turner [Fri, 1 May 2015 20:24:26 +0000 (20:24 +0000)]
[llvm-pdbdump] Support dynamic load address and external symbols.
This patch adds the --load-address command line option to
llvm-pdbdump, which dumps all addresses assuming the module has
loaded at the specified address.
Additionally, this patch adds an option to llvm-pdbdump to support
dumping of public symbols (i.e. symbols with external linkage).
llvm-svn: 236342
Keno Fischer [Fri, 1 May 2015 20:21:45 +0000 (20:21 +0000)]
Reapply [RuntimeDyldELF] Fold Placeholder into Addend
This reapplies r235060 and 235070, which were reverted because of test failures
in LLDB. The failure was caused because at moment RuntimeDyld is processing
relocations for all sections, irrespective of whether we actually load them
into memory or not, but RuntimeDyld was not actually remembering where in memory
the unrelocated section is. This commit includes a fix for that issue by
remembering that pointer, though the longer term fix should be to stop processing
unneeded sections.
Original Summary:
This allows us to get rid of the original unrelocated object file after
we're done processing relocations (but before applying them).
MachO and COFF already do not require this (currently we have temporary hacks
to prevent ownership from being released, but those are brittle and should be
removed soon).
The placeholder mechanism allowed the relocation resolver to look at original
object file to obtain more information that are required to apply the
relocations. This is usually necessary in two cases:
- For relocations targetting sub-word memory locations, there may be pieces
of the instruction at the target address which we should not override.
- Some relocations on some platforms allow an extra addend to be encoded in
their immediate fields.
The problem is that in the second case the information cannot be recovered
after the relocations have been applied once because they will have been
overridden. In the first case we also need to be careful to not use any bits
that aren't fixed and may have been overriden by applying a first relocation.
In the past both have been fixed by just looking at original object file. This
patch attempts to recover the information from the first by looking at the
relocated object file, while the extra addend in the second case is read
upon relocation processing and addend to the regular addend.
I have tested this on X86. Other platforms represent my best understanding
of how those relocations should work, but I may have missed something because
I do not have access to those platforms.
We will keep the ugly workarounds in place for a couple of days, so this commit
can be reverted if it breaks the bots.
Differential Revision: http://reviews.llvm.org/D9028
llvm-svn: 236341
Reid Kleckner [Fri, 1 May 2015 20:14:04 +0000 (20:14 +0000)]
Revert "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
This reverts commit r236339, it breaks the win32 clang-cl self-host.
llvm-svn: 236340
Reid Kleckner [Fri, 1 May 2015 20:04:54 +0000 (20:04 +0000)]
[WinEH] Add an EH registration and state insertion pass for 32-bit x86
This pass is responsible for constructing the EH registration object
that gets linked into fs:00, which is all it does in this change. In the
future, it will also insert stores to update the EH state number.
I considered keeping this functionality in WinEHPrepare, but it's pretty
separable and X86 specific. It has conceptually very little to do with
the task of WinEHPrepare, which is currently outlining. WinEHPrepare is
also in theory useful on ARM, but this logic is pretty x86 specific.
Reviewers: andrew.w.kaylor, majnemer
Differential Revision: http://reviews.llvm.org/D9422
llvm-svn: 236339
NAKAMURA Takumi [Fri, 1 May 2015 19:44:13 +0000 (19:44 +0000)]
Suppress clang/test/OpenMP/task_private_codegen.cpp on win32 for now. Investigating.
I'm dubious in weird behavior with CHECK-DAG.
Also, it won't "REQUIRE non-ms-sdk". All of RUNs have "-triple darwin".
llvm-svn: 236338
Kaelyn Takata [Fri, 1 May 2015 19:36:25 +0000 (19:36 +0000)]
Eagerly correct typos in ParenExprs that may be type casts for non-C++ code.
This is needed to ensure the type casts are parsed properly. Fixes
PR23101.
llvm-svn: 236337
Davide Italiano [Fri, 1 May 2015 19:24:29 +0000 (19:24 +0000)]
Revert unrelated chunk committed by accident in r236334.
The change is likely to be correct, but unrelated to the aforementioned
commit and needs a test to gets shipped. Sorry.
llvm-svn: 236336
Justin Bogner [Fri, 1 May 2015 19:23:34 +0000 (19:23 +0000)]
InstrProf: Fix a coverage crash where a macro begins in an unreachable block
llvm-svn: 236335
Davide Italiano [Fri, 1 May 2015 19:20:48 +0000 (19:20 +0000)]
[ELF] Fix test for .init_array.
Change the test so that it tests the right functionality.
Also put a description with the code from which the test was generated.
Reported by Simon Atanasysan.
llvm-svn: 236334
Pete Cooper [Fri, 1 May 2015 18:57:32 +0000 (18:57 +0000)]
[ARM] Transfer the internal flag in thumb2 size reduction.
Converting from t2LDRs to tLDRr caused the shift argument to drop the internal flag. This would then throw machine verifier errors.
Unfortunately i'm having trouble reducing a test case. I'm going to keep trying, but so far its a scary combination of machine sinking, an 'and i1', loads feeding loads, and a bunch of code which shouldn't change IT block formation, but does. Its not useful to commit a test in that state as we have no way of knowing if it even hits this code reliably in future.
rdar://problem/
20752113
llvm-svn: 236333
Douglas Katzman [Fri, 1 May 2015 18:51:06 +0000 (18:51 +0000)]
Move unit test into anonymous namespace as per convention.
llvm-svn: 236332
Alex Lorenz [Fri, 1 May 2015 18:34:25 +0000 (18:34 +0000)]
YAML: Fix the output of sequences that contain flow sequences.
This patch fixes a bug where the YAML Output class emitted
a sequence of flow sequences without the '-' characters.
Before:
seq:
[ a, b ]
[ c, d ]
After:
seq:
- [ a, b ]
- [ c, d ]
Reviewers: Justin Bogner
Differential Revision: http://reviews.llvm.org/D9206
llvm-svn: 236329
Alex Lorenz [Fri, 1 May 2015 18:20:23 +0000 (18:20 +0000)]
Update YamlIO documentation for the ScalarTraits class.
This patch adds the missing context parameter to the
input and output methods in ScalarTraits.
Differential Revision: http://reviews.llvm.org/D9173
llvm-svn: 236328
Peter Collingbourne [Fri, 1 May 2015 18:05:59 +0000 (18:05 +0000)]
ARM: Align functions containing Thumb-2 jump tables to 4 bytes.
Functions with jump tables need an alignment of 4 because they use the ADR
instruction, which aligns the PC to 4 bytes before adding an offset.
Differential Revision: http://reviews.llvm.org/D9424
llvm-svn: 236327
Diego Novillo [Fri, 1 May 2015 17:59:15 +0000 (17:59 +0000)]
Fix infinite recursion in ScaledNumber::toInt.
Patch from dexonsmith. The call to toInt() was calling compareTo() which
in some cases would call back to toInt(), creating an infinite loop.
Fixed by simplifying the logic in compareTo() to avoid the co-recursion.
llvm-svn: 236326
Jan Vesely [Fri, 1 May 2015 17:38:13 +0000 (17:38 +0000)]
R600: Report fp64 on all capable asics
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 236325
James Y Knight [Fri, 1 May 2015 17:13:02 +0000 (17:13 +0000)]
[Sparc] Repair fixups in little endian mode.
Differential Revision: http://reviews.llvm.org/D9434
llvm-svn: 236324
Chaoren Lin [Fri, 1 May 2015 16:58:18 +0000 (16:58 +0000)]
Fixed some compiler warnings because of bit-width mismatches.
llvm-svn: 236323
Douglas Katzman [Fri, 1 May 2015 16:49:58 +0000 (16:49 +0000)]
Fix omission from adding sparcel (original reviews.llvm.org/D9263)
"obviously" it needs to go in parseArch *and* getArchTypeForLLVMName.
Differential Revision: http://reviews.llvm.org/D9436
llvm-svn: 236322
Chaoren Lin [Fri, 1 May 2015 16:49:28 +0000 (16:49 +0000)]
Support remote-android with multiple connected devices.
Summary:
This change introduces a new URL scheme for `platform connect`:
```
adb://device-id:port
```
Reviewers: vharron, tberghammer, clayborg, ovyalov
Reviewed By: ovyalov
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D9358
llvm-svn: 236321
Chaoren Lin [Fri, 1 May 2015 16:49:23 +0000 (16:49 +0000)]
PosixPipes should not be copyable but should be movable.
Summary: This addresses Oleksiy's comment in D9307.
Reviewers: clayborg, ovyalov
Reviewed By: clayborg, ovyalov
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9405
llvm-svn: 236320
Derek Schuff [Fri, 1 May 2015 16:02:16 +0000 (16:02 +0000)]
Fix float->uint conversion for inputs less than 0
Summary:
The spec for these functions says that they should return 0 in this case but
this regressed in r234148. That revision essentially delegates the conversion
to the hardware, but that has different behavior on different platforms (e.g.
it is wrong on x86).
Also fix a typo in the name of __fixunsdfti
Test Plan: The existing unit tests now pass
Reviewers: joerg, howard.hinnant
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9305
llvm-svn: 236319
Benjamin Kramer [Fri, 1 May 2015 15:26:22 +0000 (15:26 +0000)]
Remove std::move on return of temporary.
No functionality change. Found by -Wpessimizing-move.
llvm-svn: 236318
Benjamin Kramer [Fri, 1 May 2015 15:25:29 +0000 (15:25 +0000)]
Remove std::move on return of temporary.
No functionality change. Found by -Wpessimizing-move.
llvm-svn: 236317
Benjamin Kramer [Fri, 1 May 2015 15:16:11 +0000 (15:16 +0000)]
Remove std::move on return when it could prevent copy elision.
Found by -Wpessimizing-move, no functional change. The APFloat and
PassManager change doesn't affect codegen as returning a by-value
argument will always result in a move.
llvm-svn: 236316
Benjamin Kramer [Fri, 1 May 2015 13:59:53 +0000 (13:59 +0000)]
Make helper functions static. NFC.
llvm-svn: 236315
Simon Atanasyan [Fri, 1 May 2015 13:41:45 +0000 (13:41 +0000)]
[Mips] Check creation of GOT entries corresponded to R_MIPS_REL32 relocations
No functional changes.
llvm-svn: 236314
Toma Tabacu [Fri, 1 May 2015 12:19:27 +0000 (12:19 +0000)]
[mips] [IAS] Fix error messages for using LI with 64-bit immediates.
Summary:
LI should never accept immediates larger than 32 bits.
The additional Is32BitImm boolean also paves the way for unifying the functionality that LA and LI have in common.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9289
llvm-svn: 236313
Niels Ole Salscheider [Fri, 1 May 2015 11:58:30 +0000 (11:58 +0000)]
[CMake] Also search for prefixed versions of ld.gold
llvm-svn: 236312
Toma Tabacu [Fri, 1 May 2015 10:26:47 +0000 (10:26 +0000)]
[mips] [IAS] Slightly improve shift instruction generation in expandLoadImm.
Summary:
Generate one DSLL32 of 0 instead of two consecutive DSLL of 16.
In order to do this I had to change createLShiftOri's template argument from a bool to an unsigned.
This also gave me the opportunity to rewrite the mips64-expansions.s test, as it was testing the same cases multiple times and skipping over other cases.
It was also somewhat unreadable, as the CHECK lines were grouped in a huge block of text at the beginning of the file.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8974
llvm-svn: 236311
NAKAMURA Takumi [Fri, 1 May 2015 08:38:41 +0000 (08:38 +0000)]
ASTReader.h: Prune "\param Complain" since r236300. [-Wdocumentation]
llvm-svn: 236310
NAKAMURA Takumi [Fri, 1 May 2015 08:38:22 +0000 (08:38 +0000)]
Revert r236001, "Disable clang-tools-extra/test/pp-trace/pp-trace-modules.cpp on win32 for now. Investigating."
It has been resolved.
llvm-svn: 236309
Simon Pilgrim [Fri, 1 May 2015 08:20:04 +0000 (08:20 +0000)]
[SelectionDAG] Unary vector constant folding integer legality fixes
This patch fixes issues with vector constant folding not correctly handling scalar input operands if they require implicit truncation - this was tested with llvm-stress as recommended by Patrik H Hagglund.
The patch ensures that integer input scalars from a build vector are correctly truncated before folding, and that constant integer scalar results are promoted to a legal type before inclusion in the new folded build vector.
I have added another crash test case and also a test for UINT_TO_FP / SINT_TO_FP using an non-truncated scalar input, which was failing before this patch.
Differential Revision: http://reviews.llvm.org/D9282
llvm-svn: 236308
Tom Stellard [Fri, 1 May 2015 03:44:09 +0000 (03:44 +0000)]
R600/SI: Add VCC as an implict def of SI_KILL
When SI_KILL has a register operand, its lowered form writes to vcc.
llvm-svn: 236307
Tom Stellard [Fri, 1 May 2015 03:44:08 +0000 (03:44 +0000)]
R600/SI: Fix verifier errors from the SIAnnotateControlFlow pass
This pass was generating 'Instruction does not dominate all uses!'
errors for programs which had loops with a condition variable that
depended on the result of a phi instruction from outside of the loop.
The pass was inserting new phi nodes outside of the loop which used values
defined inside the loop.
http://bugs.freedesktop.org/show_bug.cgi?id=90056
llvm-svn: 236306
Yunzhong Gao [Fri, 1 May 2015 02:04:32 +0000 (02:04 +0000)]
Fix a few line endings. NFC.
llvm-svn: 236301
Richard Smith [Fri, 1 May 2015 01:53:09 +0000 (01:53 +0000)]
[modules] Start moving the module visibility information off the Module itself.
It has no place there; it's not a property of the Module, and it makes
restoring the visibility set when we leave a submodule more difficult.
llvm-svn: 236300
Eric Fiselier [Fri, 1 May 2015 01:49:37 +0000 (01:49 +0000)]
Disallow conversions from function pointers to void*.
Function pointers and member function pointers cannot be converted to void*.
libc++abi incorrectly allows this conversion for function pointers.
Review URL: http://reviews.llvm.org/D8811
llvm-svn: 236299
Justin Bogner [Fri, 1 May 2015 01:02:17 +0000 (01:02 +0000)]
InstrProf: This call does nothing, remove it
llvm-svn: 236298
Sean Callanan [Fri, 1 May 2015 00:47:29 +0000 (00:47 +0000)]
Added support for locating and importing functions
(including inline functions) from modules in the
expression parser. We now have to retain a reference
to the code generator in ClangExpressionDeclMap so
that any imported function bodies can be appropriately
sent to that code generator.
<rdar://problem/
19883002>
llvm-svn: 236297
Quentin Colombet [Fri, 1 May 2015 00:45:55 +0000 (00:45 +0000)]
[ARM][TEST] Strengthen test against smarter reg alloc.
Follow-up of r236247.
rdar://problem/
20770899
llvm-svn: 236296
Sean Callanan [Fri, 1 May 2015 00:44:36 +0000 (00:44 +0000)]
Fixed some compiler warnings because of bit-width
mismatches.
llvm-svn: 236295
Evgeniy Stepanov [Fri, 1 May 2015 00:40:42 +0000 (00:40 +0000)]
[asancov] Fix coverage reserving 4x the necessary amount of memory on fork.
llvm-svn: 236294
Davide Italiano [Fri, 1 May 2015 00:36:41 +0000 (00:36 +0000)]
Change test target from x86_64-linux to x86_64.
llvm-svn: 236293
Sean Callanan [Fri, 1 May 2015 00:19:44 +0000 (00:19 +0000)]
Updated our use of clang::Preprocessor to reflect
a change in the API used to get macros.
llvm-svn: 236292
Davide Italiano [Fri, 1 May 2015 00:07:11 +0000 (00:07 +0000)]
[ELF] Mark linker defined symbols as .hidden when needed.
I noticed that gold mark these as hidden. While at it I rewrote the test for
this feature to use yaml rather than an object file as input.
Differential Revision: http://reviews.llvm.org/D9418
Reviewed by: ruiu
llvm-svn: 236291
Pete Cooper [Thu, 30 Apr 2015 23:57:47 +0000 (23:57 +0000)]
[ARM] optimizeSelect should clear kill flags.
If we move an instruction from one block down to a MOVC and predicate it,
then the original instruction could be moved in to a loop. In this case,
its invalid for any kill flags to remain on there.
Fails with -verfy-machineinstrs.
rdar://problem/
20752113
llvm-svn: 236290
Justin Bogner [Thu, 30 Apr 2015 23:49:42 +0000 (23:49 +0000)]
InstrProf: Support for setting profile output from command line
This change is the third of 3 patches to add support for specifying
the profile output from the command line via -fprofile-instr-generate=<path>,
where the specified output path/file will be overridden by the
LLVM_PROFILE_FILE environment variable.
This patch adds the necessary support to the clang frontend, and adds a
new test.
The compiler-rt and llvm parts are r236055 and r236288, respectively.
Patch by Teresa Johnson. Thanks!
llvm-svn: 236289
Justin Bogner [Thu, 30 Apr 2015 23:49:23 +0000 (23:49 +0000)]
InstrProf: Instrumenter support for setting profile output from command line
This change is the second of 3 patches to add support for specifying
the profile output from the command line via -fprofile-instr-generate=<path>,
where the specified output path/file will be overridden by the
LLVM_PROFILE_FILE environment variable.
This patch adds the necessary support to the llvm instrumenter, specifically
a new member of GCOVOptions for clang to save the specified filename, and
support for calling the new compiler-rt interface from __llvm_profile_init.
Patch by Teresa Johnson. Thanks!
llvm-svn: 236288
Jim Ingham [Thu, 30 Apr 2015 23:45:07 +0000 (23:45 +0000)]
Don't return nullptr when you mean to return an empty llvm::StringRef...
<rdar://problem/
20747164>
llvm-svn: 236287
Jason Molenda [Thu, 30 Apr 2015 23:42:56 +0000 (23:42 +0000)]
Guard against the case where the Write method is called with
an argument pointing into the middle of m_buffer and then
Write() calls GrowBuffer() to resize m_buffer, leaving
the content argument pointing into deallocated memory.
Patch by Kate Stone.
<rdar://problem/
20756722>
llvm-svn: 236286
Richard Smith [Thu, 30 Apr 2015 23:42:10 +0000 (23:42 +0000)]
Make macro dumping robust against a nonexistent macro.
llvm-svn: 236285
Jason Molenda [Thu, 30 Apr 2015 23:31:04 +0000 (23:31 +0000)]
Use #include "lldb/API/SBCommandReturnObject.h" instead of <...>.
llvm-svn: 236284
Matt Arsenault [Thu, 30 Apr 2015 23:20:56 +0000 (23:20 +0000)]
Fix typo
llvm-svn: 236283
Pete Cooper [Thu, 30 Apr 2015 23:14:14 +0000 (23:14 +0000)]
Commute the internal flag on MachineOperands.
When commuting a thumb instruction in the size reduction pass, thumb
instructions are represented as a bundle and so some operands may be marked
as internal. The internal flag has to move with the operand when commuting.
This test is sensitive to register allocation so can't specifically check that
this error was happening, but so long as it continues to pass with -verify then
hopefully its still ok.
rdar://problem/
20752113
llvm-svn: 236282
Richard Trieu [Thu, 30 Apr 2015 23:13:52 +0000 (23:13 +0000)]
Fix -Wpessimizing-move by removing call to std::move
llvm-svn: 236281
Richard Smith [Thu, 30 Apr 2015 23:10:40 +0000 (23:10 +0000)]
[modules] Add a mechanism to dump information about a macro.
Wire this up to "#pragma clang __debug macro <name>".
llvm-svn: 236280
Davide Italiano [Thu, 30 Apr 2015 23:08:53 +0000 (23:08 +0000)]
[Object] Teach Object and llvm-objdump about ".hidden"
Differential Revision: http://reviews.llvm.org/D9416
Reviewed by: rafael
llvm-svn: 236279
Richard Trieu [Thu, 30 Apr 2015 23:07:00 +0000 (23:07 +0000)]
Fix -Wpessimizing-move warnings by removing std::move calls.
llvm-svn: 236278
Justin Bogner [Thu, 30 Apr 2015 22:58:28 +0000 (22:58 +0000)]
InstrProf: Fix handling of profile counters in the body of range based for
We were assigning the counter for the body of the loop to the loop
variable initialization for some reason here, but our tests completely
lacked coverage for range-for loops. This fixes that and makes the
logic generally more similar to the logic for a regular for.
llvm-svn: 236277
Reid Kleckner [Thu, 30 Apr 2015 22:42:45 +0000 (22:42 +0000)]
Re-commit the test fix that went with r236274
llvm-svn: 236276
Rafael Espindola [Thu, 30 Apr 2015 22:41:12 +0000 (22:41 +0000)]
Remove unnecessary break.
llvm-svn: 236275
Reid Kleckner [Thu, 30 Apr 2015 22:29:25 +0000 (22:29 +0000)]
Revert most of r236271, leaving only the datalayout change in lib/Basic/Targets.cpp
llvm-svn: 236274
Quentin Colombet [Thu, 30 Apr 2015 22:27:20 +0000 (22:27 +0000)]
[AArch64] Fix bad register class constraint in fast-isel for TST instruction.
rdar://problem/
20748715
llvm-svn: 236273
Pete Cooper [Thu, 30 Apr 2015 22:15:59 +0000 (22:15 +0000)]
Don't always apply kill flag in thumb2 ABS pseudo expansion.
The expansion for t2ABS was always setting the kill flag on the rsb instruction.
It should instead only be set on rsb if it was set on the original ABS instruction.
rdar://problem/
20752113
llvm-svn: 236272
Reid Kleckner [Thu, 30 Apr 2015 22:13:05 +0000 (22:13 +0000)]
Use 4 byte preferred aggregate alignment in datalayout on x86 Win32
llvm-svn: 236271
Reid Kleckner [Thu, 30 Apr 2015 22:11:59 +0000 (22:11 +0000)]
[X86] Use 4 byte preferred aggregate alignment on Win32
This helps reduce the frequency of stack realignment prologues in 32-bit
X86 Windows code. Before this change and the corresponding clang change,
we would take the max of the type preferred alignment and the explicit
alignment on the alloca.
If you don't override aggregate alignment in datalayout, you get a
default of 8. This dates back to 2007 / r34356, and changing it seems
prohibitively difficult at this point.
llvm-svn: 236270
Matthias Braun [Thu, 30 Apr 2015 22:05:30 +0000 (22:05 +0000)]
InstCombineSimplifyDemanded: Remove nsw/nuw flags when optimizing demanded bits
When optimizing demanded bits of the operands of an Add we have to
remove the nsw/nuw flags as we have no guarantee anymore that we don't
wrap. This is legal here because the top bit is not demanded. In fact
this operaion was already performed but missed in the case of an Add
with a constant on the right side. To fix this this patch refactors the
code to unify the code paths in SimplifyDemandedUseBits() handling of
Add/Sub:
- The transformation of Add->Or is removed from the simplify demand
code because the equivalent transformation exists in
InstCombiner::visitAdd()
- KnownOnes/KnownZero are not adjusted for Add x, C anymore as
computeKnownBits() already performs these computations.
- The simplification of the operands is unified. In this new version
constant on the right side of a Sub are shrunk now as I could not find
a reason why not to do so.
- The special case for clearing nsw/nuw in ShrinkDemandedConstant() is
not necessary anymore as the caller does that already.
Differential Revision: http://reviews.llvm.org/D9415
llvm-svn: 236269