Commit Graph

175085 Commits

Author SHA1 Message Date
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
Manuel Klimek 5a1ef9c855 Fix clang-query on Windows: flush llvm::outs() after each command.
llvm-svn: 209313
2014-05-21 18:10:47 +00:00
Ed Maste a45c1600dc Implement Host::GetThreadName for FreeBSD
llvm-svn: 209312
2014-05-21 18:09:55 +00:00
David Blaikie ce7a1bd038 DebugInfo: Simplify subprogram declaration creation/references and accidentally refix PR11300.
Also simplifies the linkage name handling a little too.

llvm-svn: 209311
2014-05-21 18:04:33 +00:00
Matt Arsenault 03df7eeda1 Use cast<> instead of unchecked dyn_cast
llvm-svn: 209310
2014-05-21 18:03:59 +00:00
Saleem Abdulrasool 6eae1e6bbf MC: loosen an overzealous assertion
Permit active macro expansions when terminating the assembler if there were
errors during the expansion.  This would only trigger on invalid input when
built with assertions.

llvm-svn: 209309
2014-05-21 17:53:18 +00:00
Greg Fitzgerald 962a339bec Use llvm-lit if LLVM source tree is unavailable.
llvm-svn: 209308
2014-05-21 16:44:03 +00:00
Marshall Clow 9393b5113b Fix Bug 19678 - libc++ does not correctly handle the regex: '[^\0]*'
llvm-svn: 209307
2014-05-21 16:29:50 +00:00
Dave Estes 4aa7340d14 Test comment commit.
llvm-svn: 209306
2014-05-21 16:19:51 +00:00
Marshall Clow ef0e8c391e Fix bug 19740; round-tripping a pointer through a stream doesn't work
llvm-svn: 209305
2014-05-21 16:02:20 +00:00
Benjamin Kramer f3a11c1051 Remove outdated diagnostic.
llvm-svn: 209304
2014-05-21 15:57:22 +00:00
Rafael Espindola 9cb97b630d Update for llvm api change in r209266.
llvm-svn: 209303
2014-05-21 15:08:27 +00:00
Serge Pavlov 921c2ba18b Improved recovery of switch statement
Make better diagnostic produced by erroneous switch statement.
It fixes PR19022.

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

llvm-svn: 209302
2014-05-21 14:48:43 +00:00
Sergey Matveev 162d7cb9d1 [sanitizer] Attempt to fix test.
llvm-svn: 209301
2014-05-21 14:36:05 +00:00