Commit Graph

199905 Commits

Author SHA1 Message Date
Nico Weber 4b5b1ac997 Fix typo in comment.
llvm-svn: 236392
2015-05-02 21:34:39 +00:00
Simon Atanasyan 1c55a071fd [Mips] Add more checkings to the test
No functional changes.

llvm-svn: 236391
2015-05-02 21:03:00 +00:00
Yaron Keren 203439f1f8 clang-format function definition header. NFC.
llvm-svn: 236390
2015-05-02 19:29:29 +00:00
Yaron Keren 2155f80426 Replace GetNumBytesInBuffer() in MicrosoftCXXNameMangler::mangleArgumentType by tell().
Using GetNumBytesInBuffer() assumes that the stream was not flushed between
the GetNumBytesInBuffer() calls, which may happen to be true or not,
depending on stream policy. tell() always reports the correct stream location.

Do note there are only two more uses of GetNumBytesInBuffer() in LLVM+clang, in
lib/MC/MCAsmStreamer.cpp and lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp.
The former may be replacable by tell (needs testing) but while the later can
not be immediatly replaced by tell() as it uses the absolute value of
GetNumBytesInBuffer() rather than the real stream position. Both uses seems
to depend upon flush policy and thus may not work correctly depending upon the
stream behaviour.

Going forward, GetNumBytesInBuffer() should probably be protected, non-accessible
to raw_ostream clients.

llvm-svn: 236389
2015-05-02 15:31:08 +00:00
Simon Pilgrim d5e20306cc [SSE2] Minor tidyup of v16i8 SHL lowering. NFC.
Removed code that was replicating v8i16 'shift + mask' implementation that is done more nicely by making use of LowerScalarImmediateShift

llvm-svn: 236388
2015-05-02 14:42:43 +00:00
Simon Pilgrim 017ca19384 [DAGCombiner] Enabled vector float/double -> int constant folding
llvm-svn: 236387
2015-05-02 13:04:07 +00:00
Simon Pilgrim e170a4f5fa Line ending fix
llvm-svn: 236386
2015-05-02 11:50:47 +00:00
Simon Pilgrim 7d6df82dd1 [SSE] Added vector int (i32 and i64) -> float/double conversion tests
llvm-svn: 236385
2015-05-02 11:42:47 +00:00
Simon Pilgrim 6e3b7bad11 [SSE] Added vector float/double -> i32 and i64 conversion tests
llvm-svn: 236384
2015-05-02 11:18:47 +00:00
Daniel Jasper f69b922e57 clang-format: [JS] Fix calculation of template string width.
OriginalColumn might not be set, so fall back to Location and SourceMgr
in case it is missing. Also initialize end column in case the token is
multi line, but it's the ` token itself that starts the multi line.

Patch by Martin Probst, thank you!

llvm-svn: 236383
2015-05-02 08:05:38 +00:00
Daniel Jasper d22190632c clang-format: [JS] Fix templated parameter default values.
Parameters can have templated types and default values (= ...), which is
another location in which a template closer should be followed by
whitespace.

Patch by Martin Probst, thank you.

llvm-svn: 236382
2015-05-02 07:54:58 +00:00
David Majnemer cfcac9f64a [MS ABI] Add testcase which was missing from r236354
This test verifies that we can detect when the inheritance paths are
ambiguous due to covariant thunks, ensuring we don't regress PR16759.

llvm-svn: 236381
2015-05-02 05:12:53 +00:00
Justin Bogner 65512647cc InstrProf: Cede ownership of createProfileWeights to CGF
The fact that PGO has a say in how these branch weights are determined
isn't interesting to most of CodeGen, so it makes more sense for this
API to be accessible via CodeGenFunction rather than CodeGenPGO.

llvm-svn: 236380
2015-05-02 05:00:55 +00:00
David Blaikie 72d03efa6d DebugInfo: Use low_pc relative debug_ranges under fission when the CU has a low_pc
Seems we were setting the base address on the wrong DwarfCompileUnit
object so it wasn't being used when generating the ranges.

llvm-svn: 236377
2015-05-02 02:31:49 +00:00
Richard Smith 10434f307c [modules] Remove dead code from Module for tracking macro import locations.
llvm-svn: 236376
2015-05-02 02:08:26 +00:00
Richard Smith 32dbd69ce2 [modules] Don't bother creating a ModuleMacro representing a #undef that overrides nothing.
llvm-svn: 236374
2015-05-02 01:14:40 +00:00
Eric Christopher a2d44dee73 Rework test to use FileCheck by making sure we have no xmm registers
with numbers.

llvm-svn: 236373
2015-05-02 01:06:17 +00:00
Steven Wu 1d56be869e 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
2015-05-02 00:56:15 +00:00
Kaelyn Takata 40055d1185 Diagnose delayed typos when parsing a postfix expression with an
unmatched l_paren before setting the LHS to ExprError().

Fixes PR23285.

llvm-svn: 236371
2015-05-02 00:49:18 +00:00
Justin Bogner a909abfd29 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
2015-05-02 00:48:27 +00:00
Richard Smith 38477db8c4 [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
2015-05-02 00:45:56 +00:00
Jim Grosbach ae4c2649dc MC: Tidy up comments and clean up formatting a bit. NFC.
llvm-svn: 236368
2015-05-02 00:44:14 +00:00
Jim Grosbach bfe3a9c318 Fix spelling.
llvm-svn: 236367
2015-05-02 00:44:07 +00:00
Siva Chandra 6b921144ce 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
2015-05-02 00:37:12 +00:00
Justin Bogner 07193cc80b 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
2015-05-01 23:41:09 +00:00
Jason Molenda 8980e6bc10 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
2015-05-01 23:39:48 +00:00
Enrico Granata b0e8a55d4d Fix an issue where the UTF dumper was ignoring the direction to generate uncapped dumps
llvm-svn: 236362
2015-05-01 22:57:38 +00:00
Justin Bogner 25723948c0 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
2015-05-01 22:52:48 +00:00
Reid Kleckner 83d89fa546 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
2015-05-01 22:50:14 +00:00
Reid Kleckner 51476acd77 Re-land "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
This reverts commit r236340.

llvm-svn: 236359
2015-05-01 22:40:25 +00:00
Colin LeMahieu bb0d7cbee1 [Hexagon] r236351 fix does not work on builder configurations yet.
llvm-svn: 236358
2015-05-01 22:39:20 +00:00
Reid Kleckner 3d6011fbef Disable exceptions for clang-compiled unittest code on Windows
llvm-svn: 236357
2015-05-01 22:23:56 +00:00
Marshall Clow de55932c0d Found a Urbana paper that has library bits
llvm-svn: 236356
2015-05-01 22:14:35 +00:00
David Majnemer 750f11533e Remove some code left around for debugging purposes
llvm-svn: 236355
2015-05-01 21:42:19 +00:00
David Majnemer 70e6a00170 [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
2015-05-01 21:35:45 +00:00
David Majnemer ead97576a9 [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
2015-05-01 21:35:41 +00:00
Quentin Colombet 0de2346859 [AArch64][FastISel] Variant of the logical instructions that use two input
registers cannot write on SP.

rdar://problem/20748715

llvm-svn: 236352
2015-05-01 21:34:57 +00:00
Colin LeMahieu 6efd273a61 [Hexagon] Removing variable unused in release.
llvm-svn: 236351
2015-05-01 21:30:22 +00:00
Richard Smith ee977933f7 [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
2015-05-01 21:22:17 +00:00
Tim Northover f9b517c159 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
2015-05-01 21:17:25 +00:00
Colin LeMahieu b662565475 [Hexagon] Adding expression MC emission and removing XFAIL from test that hits this code path.
llvm-svn: 236348
2015-05-01 21:14:21 +00:00
Kaelyn Takata a8dfd33611 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
2015-05-01 20:59:18 +00:00
Quentin Colombet 9df2fa261b [AArch64][FastISel] Fix the setting of kill flags for MUL -> UMULH sequences.
rdar://problem/20748715

llvm-svn: 236346
2015-05-01 20:57:11 +00:00
Zachary Turner 292e92d99d Fix compilation of PDBApiTest.
llvm-svn: 236345
2015-05-01 20:51:49 +00:00
Nick Lewycky b443dfef82 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
2015-05-01 20:47:19 +00:00
Zachary Turner 6799af41fe Fix build.
llvm-svn: 236343
2015-05-01 20:33:10 +00:00
Zachary Turner e5cb269352 [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
2015-05-01 20:24:26 +00:00
Keno Fischer e6892c8149 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
2015-05-01 20:21:45 +00:00
Reid Kleckner 2747d3d55a 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
2015-05-01 20:14:04 +00:00
Reid Kleckner 4856fc61b4 [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
2015-05-01 20:04:54 +00:00