Commit Graph

174948 Commits

Author SHA1 Message Date
Eric Christopher 65382d7316 Remove unused variable.
llvm-svn: 209391
2014-05-22 05:33:03 +00:00
Saleem Abdulrasool 2bd1262a32 ARM: introduce llvm.arm.undefined intrinsic
This intrinsic permits the emission of platform specific undefined sequences.
ARM has reserved the 0xde opcode which takes a single integer parameter (ignored
by the CPU).  This permits the operating system to implement custom behaviour on
this trap.  The llvm.arm.undefined intrinsic is meant to provide a means for
generating the target specific behaviour from the frontend.  This is
particularly useful for Windows on ARM which has made use of a series of these
special opcodes.

llvm-svn: 209390
2014-05-22 04:46:46 +00:00
Craig Topper 49a2790fb3 [C++11] Use 'nullptr'. Frontend edition.
llvm-svn: 209389
2014-05-22 04:46:25 +00:00
Matt Arsenault c3a73c3087 R600/SI: Match fp_to_uint / uint_to_fp for f64
llvm-svn: 209388
2014-05-22 03:20:30 +00:00
Saleem Abdulrasool 6663f8f2c0 MC: formalise some assertions into proper errors
Now that clang can be used as an assembler via the IAS, invalid assembler inputs
would cause the assertions to trigger.  Although we cannot recover from the
errors here, nor provide caret diagnostics, attempt to handle them slightly more
gracefully by reporting a fatal error.

llvm-svn: 209387
2014-05-22 02:18:10 +00:00
Eric Christopher 0e6e7cf385 Override runOnMachineFunction for ARMISelDAGToDAG so that we can
reset the subtarget on each function.

llvm-svn: 209386
2014-05-22 02:00:27 +00:00
Nick Kledzik d48cb047e4 [mach-o] Remove MachOFormat.hpp, everything now uses llvm/Support/MachO.h
llvm-svn: 209385
2014-05-22 01:56:40 +00:00
Eric Christopher 4f09c59243 Override runOnMachineFunction for X86ISelDAGToDAG so that we can
reset the subtarget on each function.

llvm-svn: 209384
2014-05-22 01:53:26 +00:00
Nick Kledzik e39685964b [mach-o] Use lit.local.cfg to enable mach-o test cases to be run
llvm-svn: 209383
2014-05-22 01:47:17 +00:00
Eric Christopher 0d5c99eb08 Avoid using subtarget features when adding X86 specific passes to
the pass pipeline.

llvm-svn: 209382
2014-05-22 01:46:02 +00:00
Eric Christopher e0bd2fa927 Remove extra local variable.
llvm-svn: 209381
2014-05-22 01:45:59 +00:00
Eric Christopher 463b84b48b Rename createGlobalBaseRegPass -> createX86GlobalBaseRegPass to make
it obvious that it's a target specific pass.

llvm-svn: 209380
2014-05-22 01:45:57 +00:00
Nick Kledzik a0c13a2420 [mach-o] parse literal sections into atoms
llvm-svn: 209379
2014-05-22 01:42:06 +00:00
Richard Trieu 9098c9f1a8 Add hasSameType overload to ASTContext for Type pointers. Switch a type
comparison check to use this instead of calling Type::getCanonicalTypeInternal

llvm-svn: 209378
2014-05-22 01:39:16 +00:00
Eric Christopher 89f18805f4 Fix typo.
llvm-svn: 209377
2014-05-22 01:21:44 +00:00
Eric Christopher d71e4441c9 Avoid using subtarget features when initializing the pass pipeline
on PPC.

llvm-svn: 209376
2014-05-22 01:21:35 +00:00
Eric Christopher 1b8e763630 Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.
This required updating the generated functions and TD file accordingly
to be pointers rather than const references.

llvm-svn: 209375
2014-05-22 01:07:24 +00:00
Eric Christopher 0ecfbdf4ad Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.
llvm-svn: 209374
2014-05-22 01:07:21 +00:00
Eric Christopher e43ecace70 Sort includes.
llvm-svn: 209373
2014-05-22 01:07:18 +00:00
David Blaikie 8729bca333 DebugInfo: Simplify dead variable collection slightly.
constructSubprogramDIE was already called for every subprogram in every
CU when the module was started - there's no need to call it again at
module finalization.

llvm-svn: 209372
2014-05-22 00:48:36 +00:00
Andrew Trick e255359b57 Fix a bug in SCEV's backedge taken count computation from my prior fix in Jan.
This has to do with the trip count computation for loops with multiple
exits, which is quite subtle. Most passes just ask for a single trip
count number, so we must be conservative assuming any exit could be
taken.  Normally, we rely on the "exact" trip count, which was
correctly given as "unknown". However, SCEV also gives a "max"
back-edge taken count. The loops max BE taken count is conservatively
a maximum over the max of each exit's non-exiting iterations
count. Note that some exit tests can be skipped so the max loop
back-edge taken count can actually exceed the max non-exiting
iterations for some exits. However, when we know the loop *latch*
cannot be skipped, we can directly use its max taken count
disregarding other exits. I previously took the minimum here without
checking whether the other exit could be skipped. The correct, and
simpler thing to do here is just to directly use the loop latch's max
non-exiting iterations as the loops max back-edge count.

In the problematic test case, the first loop exit had a max of zero
non-exiting iterations, but could be skipped. The loop latch was known
not to be skipped but had max of one non-exiting iteration. We
incorrectly claimed the loop back-edge could be taken zero times, when
it is actually taken one time.

Fixes Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count.
Loop %for.body.i: max backedge-taken count is 1.

llvm-svn: 209358
2014-05-22 00:37:03 +00:00
Rui Ueyama 328da5527e Simplify nullptr check.
llvm-svn: 209357
2014-05-22 00:36:36 +00:00
Eli Bendersky f13a05607c Similar to bitcast, treat addrspacecast as a foldable operand.
Added a test sink-addrspacecast.ll to verify this change.

Patch by Jingyue Wu.

llvm-svn: 209343
2014-05-22 00:02:52 +00:00
Eric Christopher 3470bbbd54 Fix compilation issues.
llvm-svn: 209342
2014-05-21 23:51:57 +00:00
Jason Molenda 8eb3281731 Change ProcessKDP::DoReadMemory() to break up large memory
read requests into smaller chunks; some remote kdp stubs
cannot handle memory reads larger than a KB or two & will
error out.
<rdar://problem/16983125> 

llvm-svn: 209341
2014-05-21 23:44:02 +00:00
Eric Christopher 6b0fcfee36 Make early if conversion dependent upon the subtarget and add
a subtarget hook to enable. Unconditionally add to the pass pipeline
for targets that might want to use it. No functional change.

llvm-svn: 209340
2014-05-21 23:40:26 +00:00
Eric Christopher ed19bad617 Group the scheduling functions together.
llvm-svn: 209339
2014-05-21 23:40:18 +00:00
David Blaikie 2da282b860 Revert "DebugInfo: Don't put fission type units in comdat sections."
This reverts commit r208930, r208933, and r208975.

It seems not all fission consumers are ready to handle this behavior.
Reverting until tools are brought up to spec.

llvm-svn: 209338
2014-05-21 23:27:41 +00:00
Saleem Abdulrasool 0bd31835ea MC: correct IMAGE_REL_ARM_MOV32T relocation emission
This corrects the emission of IMAGE_REL_ARM_MOV32T relocations.  Previously, we
were avoiding the high portion of the relocation too early.  If there was a
section-relative relocation with an offset greater than 16-bits (65535), you
would end up truncating the high order bits of the offset.  Allow the current
relocation representation to flow through out the MC layer to the object writer.
Use the new ability to restrict recorded relocations to avoid emitting the
relocation into the final object.

llvm-svn: 209337
2014-05-21 23:17:56 +00:00
Saleem Abdulrasool 54bed12082 MC: introduce ability to restrict recorded relocations
Add support to allow a target specific COFF object writer to restrict the
recorded resolutions in the emitted object files.  This is motivated by the need
in Windows on ARM, where an intermediate relocation needs to be prevented from
being emitted in the object file.

llvm-svn: 209336
2014-05-21 23:17:50 +00:00
David Blaikie 1ea9db2dce DebugInfo: Use the SPMap to find the parent CU of inlined functions as they may not be in the current CU
Committed in r209178 then reverted in r209251 due to LTO breakage,
here's a proper fix for the case of the missing subprogram DIE. The DIEs
were there, just in other compile units. Using the SPMap we can find the
right compile unit to search for and produce cross-unit references to
describe this kind of inlining.

One existing test case needed to be updated because it had a function
that wasn't in the CU's subprogram list, so it didn't appear in the
SPMap.

llvm-svn: 209335
2014-05-21 23:14:12 +00:00
Rui Ueyama 8f2394d456 Fix comment.
llvm-svn: 209334
2014-05-21 23:07:16 +00:00
Matt Arsenault 40100887b6 R600: Add comment describing problems with LowerConstantInitializer
llvm-svn: 209333
2014-05-21 22:59:17 +00:00
Justin Bogner 44fa45034b VirtualFileSystem: Fix a few directory traversal bugs in VFSWriter
There are a couple of issues with writing VFS maps that are awkward to
fix within the current mutually recursive approach. Instead, replace
the algorithm with an iterative version that uses an explicit stack of
directories.

Includes tests for cases the old approach was tripping on.

llvm-svn: 209332
2014-05-21 22:46:51 +00:00
Matt Arsenault 6a57fd8b47 R600: Partially fix constant initializers for structs and vectors.
This should extend the current workaround to work with structs
that only contain legal, scalar types.

llvm-svn: 209331
2014-05-21 22:42:42 +00:00
Matt Arsenault 310f761a42 R600: Add failing testcases for constant initializers.
Constant initializers involving illegal types hit an assertion.

Patch by: Jan Vesely <jan.vesely@rutgers.edu>

llvm-svn: 209330
2014-05-21 22:42:38 +00:00
Eric Christopher 0120db5f8a Remove getTargetLowering from TargetPassConfig as the target lowering
can change depending upon subtarget/subtarget features for a function.

llvm-svn: 209329
2014-05-21 22:42:07 +00:00
Eric Christopher 1e65e7cab5 Remove unused member variable from hexagon pass.
llvm-svn: 209328
2014-05-21 22:42:02 +00:00
David Blaikie 825bdd2fc6 DebugInfo: Ensure concrete out of line variables from inlined functions reference their abstract origins.
llvm-svn: 209327
2014-05-21 22:41:17 +00:00
Quentin Colombet b4d53f1afa [X86] Fix a bug in the lowering of BLENDI introduced in r209043.
ISD::VSELECT mask uses 1 to identify the first argument and 0 to identify the
second argument.
On the other hand, BLENDI uses 0 to identify the first argument and 1 to
identify the second argument.
Fix the generation of the blend mask to account for this difference.

The bug did not show up with r209043, because we were not checking for the
actual arguments of the blend instruction!
This commit also fixes the test cases.

Note: The same mask works for the BLENDr variant because the arguments are
swapped during instruction selection (see the BLENDXXrr patterns).

<rdar://problem/16975435>

llvm-svn: 209324
2014-05-21 22:00:39 +00:00
Rui Ueyama 339d12ff12 [PECOFF] Fix unsafe memory access.
llvm-svn: 209323
2014-05-21 21:51:11 +00:00
Alp Toker 6521ecc083 Provide an aka for the C++ operator name macro diagnostic
llvm-svn: 209322
2014-05-21 21:23:39 +00:00
Eric Christopher 472cee3080 Move MCOptions that aren't shared between programs into their specific
program and have them initialize the MCOptions struct explicitly.

llvm-svn: 209321
2014-05-21 21:05:09 +00:00
Eric Christopher 473ec184a2 Make a couple of command lines static and remove an unnecessary
initialization.

llvm-svn: 209320
2014-05-21 21:05:05 +00:00
David Majnemer e37a6ce9f7 Sema: Implement DR244
Summary:
Naming the destructor using a typedef-name for the class-name is
well-formed.

This fixes PR19620.

Reviewers: rsmith, doug.gregor

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3583

llvm-svn: 209319
2014-05-21 20:19:59 +00:00
Todd Fiala 2b4307d037 Added tests for q{f,s}ThreadInfo for attached processes.
Added helper methods:
prep_debug_monitor_and_inferior(): properly handles
the two cases of running the stub against an inferior process
launched by the stub, and one attached to by the stub.  See
docs for function: simplifies test creation for tests that want
to test the same operations against a launched and attached inferior.

Added the q{f,s}ThreadInfo and $qC response comparison test (verifies
they both return the same thing) when the process is attached rather
than launched by the stub.

Modified the previous two tests added to make use of the new
prep_debug_monitor_and_inferior() facility.

llvm-svn: 209318
2014-05-21 20:12:01 +00:00
Rui Ueyama 9f4674c828 [PECOFF] Check for a Characteristics field of a .debug section.
llvm-svn: 209317
2014-05-21 19:44:08 +00:00
Alp Toker ab54f46eec cindex/test_cursor.py: no need to skip implicit decls in tests
clang was fixed some time ago to always skip "builtins and other cruft" so
tools no longer need hacks like this.

Passes nosetests.

llvm-svn: 209316
2014-05-21 19:17:38 +00:00
Simon Atanasyan 37fe06711f [Mips] Simplify handling of R_MIPS_LO16 / R_MIPS_HI16 relocations
against _gp_disp symbol.

llvm-svn: 209315
2014-05-21 18:23:46 +00:00
Todd Fiala 2954206e56 Added gdb-remote tests for q{f,s}ThreadInfo.
The First test verifies that qThreadInfo queries work for stub-launched processes.

The second test verifies that $qC after stub-launched inferior returns the same
thread as the qThreadInfo queries.

llvm-svn: 209314
2014-05-21 18:12:14 +00:00