Commit Graph

177878 Commits

Author SHA1 Message Date
Rafael Espindola 44cb242dda Use raw_fd_ostream instead of std::ofstream.
llvm-svn: 212483
2014-07-07 20:34:51 +00:00
David Majnemer aea50ce97c CMake: Let LLDB build with CMake 3
Teach add_lldb_library to correctly use the CMake 2.8.12
PUBLIC/PRIVATE/INTERFACE keywords.  LLDB's CMake configuration would
inconsistently apply these keywords; this was previously a warning in
CMake 2.x but became an error in CMake 3.

llvm-svn: 212482
2014-07-07 20:29:00 +00:00
Reid Kleckner 3b5c639f48 Driver: Produce crash diagnostics more often on Windows
Assertion failures call abort(), which return an exit code of 3 on
Windows.  The 'not' utility has the same check.

Unfortunately, the crash-report.c test requires a shell, so it does not
run for me locally, so I can only test this manually.

There's still more work to be done here: we should generate a batch
script instead of a shell script on Windows.

llvm-svn: 212481
2014-07-07 20:23:27 +00:00
Simon Atanasyan 49eafe909b [Mips] Make rel-dynamic-05.test test case independent from external input files.
llvm-svn: 212480
2014-07-07 20:14:49 +00:00
Renato Golin 1e9c282cd1 Refactor ARM subarchitecture parsing
According to a FIXME in ARMMCTargetDesc.cpp the ARM version parsing should be
in the Triple helper class.

Patch by: Gabor Ballabas

llvm-svn: 212479
2014-07-07 20:01:11 +00:00
Ulrich Weigand 5fd91e0c0b [PowerPC] Fix testcase regression
Use -mcpu to avoid different codegen depending on host platform.

llvm-svn: 212478
2014-07-07 19:41:54 +00:00
Ulrich Weigand de8641bfde [PowerPC] Fix no-assert build
r212476 caused a compile failure (unused variable) in a non-assertion
build ...

llvm-svn: 212477
2014-07-07 19:39:44 +00:00
Ulrich Weigand ec2bf93895 [PowerPC] Fix "byval align" arguments
Arguments passed as "byval align" should get the specified alignment
in the parameter save area.  There was some code in PPCISelLowering.cpp
that attempted to implement this, but this didn't work correctly:
while code did update the ArgOffset value, it neglected to update
the PtrOff value (which was already computed from the old ArgOffset),
and it also neglected to update GPR_idx -- fields skipped due to
alignment in the save area must likewise be skipped in GPRs.

This patch fixes and simplifies this logic by:
- handling argument offset alignment right at the beginning
  of argument processing, using a new helper routine
  CalculateStackSlotAlignment (this avoids having to update
  PtrOff and other derived values later on)
- not tracking GPR_idx separately, but always computing the
  correct GPR_idx for each argument *from* its ArgOffset
- removing some redundant computation in LowerFormalArguments:
  MinReservedArea must equal ArgOffset after argument processing,
  so there's no use in computing it twice.

[This doesn't change the behavior of the current clang front-end,
since that never creates "byval align" arguments at the moment.
This will change with a follow-on patch, however.]

llvm-svn: 212476
2014-07-07 19:26:41 +00:00
Chandler Carruth beeacac0b3 [x86] Revert r212324 which was too aggressive w.r.t. allowing undef
lanes in vector splats.

The core problem here is that undef lanes can't *unilaterally* be
considered to contribute to splats. Their handling needs to be more
cautious. There is also a reported failure of the nightly testers
(thanks Tobias!) that may well stem from the same core issue. I'm going
to fix this theoretical issue, factor the APIs a bit better, and then
verify that I don't see anything bad with Tobias's reduction from the
test suite before recommitting.

Original commit message for r212324:
  [x86] Generalize BuildVectorSDNode::getConstantSplatValue to work for
  any constant, constant FP, or undef splat and to tolerate any undef
  lanes in a splat, then replace all uses of isSplatVector in X86's
  lowering with it.

  This fixes issues where undef lanes in an otherwise splat vector would
  prevent the splat logic from firing. It is a touch more awkward to use
  this interface, but it is much more accurate. Suggestions for better
  interface structuring welcome.

  With this fix, the code generated with the widening legalization
  strategy for widen_cast-4.ll is *dramatically* improved as the special
  lowering strategies for a v16i8 SRA kick in even though the high lanes
  are undef.

  We also get a slightly different choice for broadcasting an aligned
  memory location, and use vpshufd instead of vbroadcastss. This looks
  like a minor win for pipelining and domain crossing, but a minor loss
  for the number of micro-ops. I suspect its a wash, but folks can
  easily tweak the lowering if they want.

llvm-svn: 212475
2014-07-07 19:03:32 +00:00
Alexey Samsonov c1856835d1 [Sanitizer] Move test for malloc/free hooks under test/sanitizer_common
llvm-svn: 212474
2014-07-07 18:47:29 +00:00
Matt Arsenault d2c9e08b63 R600: Fix mishandling of load / store chains.
Fixes various bugs with reordering loads and stores.
Scalarized vector loads weren't collecting the chains
at all.

llvm-svn: 212473
2014-07-07 18:34:45 +00:00
Matt Arsenault fda9dad17f Fix typo, weird indentation
llvm-svn: 212472
2014-07-07 18:34:42 +00:00
Alexey Samsonov 58a046fe56 [ASan] Clean up leftovers from assembly instrumentation helpers
llvm-svn: 212471
2014-07-07 18:11:24 +00:00
Tom Stellard 8d92c396d9 prepare-builtins: Fix broken build due to recent LLVM API change
llvm-svn: 212470
2014-07-07 17:46:45 +00:00
Alexey Samsonov 91bb8e0e3a Generalize sanitizer allocator public interface.
Introduce new public header <sanitizer/allocator_interface.h> and a set
of functions __sanitizer_get_ownership(), __sanitizer_malloc_hook() etc.
that will eventually replace their tool-specific equivalents
(__asan_get_ownership(), __msan_get_ownership() etc.). Tool-specific
functions are now deprecated and implemented as stubs redirecting
to __sanitizer_ versions (which are implemented differently in each tool).

Replace all uses of __xsan_ versions with __sanitizer_ versions in unit
and lit tests.

llvm-svn: 212469
2014-07-07 17:39:31 +00:00
Justin Bogner 761439962b Driver: Fix think-o in adding -ivfsoverlay flag to crashdumps
If there isn't a VFS to overlay we shouldn't be adding a -ivfsoverlay
flag.

llvm-svn: 212468
2014-07-07 17:34:40 +00:00
Ben Langmuir e218cd77b4 Use temporary module cache in test
llvm-svn: 212467
2014-07-07 17:34:37 +00:00
Manuel Klimek 1f6f6e60ad Fix memory leak in FileSystemStatCache.
Patch by Guochun Shi.

llvm-svn: 212466
2014-07-07 17:00:49 +00:00
Timur Iskhodzhanov 575180dbd2 [ASan/Win] Unbreak the build after r211216
llvm-svn: 212465
2014-07-07 16:22:04 +00:00
Anders Carlsson 1a9fe3d4db Handle __builtin_clzs and __builtin_ctzs in the constant expression evaluator.
llvm-svn: 212464
2014-07-07 15:53:44 +00:00
David Majnemer ccef89db65 MS ABI: Don't unnecessarily use CGM abstraction
If we are in MicrosoftCXXABI, we don't need to use CGM to get a
TypeDescriptor.

llvm-svn: 212463
2014-07-07 15:29:16 +00:00
David Majnemer 26a90f85f7 Fix comment typo.
No functionality changed.

llvm-svn: 212462
2014-07-07 15:29:10 +00:00
Tim Northover aeacbb1b54 [testing]: lld generally lives in tools/, so fix llvm-lit.
Otherwise we can't run individual tests directly ("llvm-lit /path/to/test")

llvm-svn: 212461
2014-07-07 15:26:53 +00:00
Benjamin Kramer 6cbe670db8 Make helper functions static.
llvm-svn: 212460
2014-07-07 14:47:51 +00:00
Tim Northover 3705283b24 X86: revert unintentional change to X86FastISel.
This crept in with r212443.

llvm-svn: 212459
2014-07-07 14:06:42 +00:00
Alp Toker f5ea368917 PTHInternals.rst: PCH is now a thing, update docs to reflect it
llvm-svn: 212458
2014-07-07 14:02:39 +00:00
Alp Toker 2584735846 PTH: use a variable instead of a macro
Cleanup only.

llvm-svn: 212457
2014-07-07 14:01:37 +00:00
Evgeniy Stepanov 86c077b3a2 [asan] Remove runtime assembly helpers.
Remove helper functions that were used in assembly instrumentation.

Patch by Yuri Gorshenin.

llvm-svn: 212456
2014-07-07 13:59:12 +00:00
Evgeniy Stepanov 6fa6c677cc [asan] Generate asm instrumentation in MC.
Generate entire ASan asm instrumentation in MC without
relying on runtime helper functions.

Patch by Yuri Gorshenin.

llvm-svn: 212455
2014-07-07 13:57:37 +00:00
Evgeniy Stepanov d948a5f3c3 [msan] Fix handling of phi in blacklisted functions.
llvm-svn: 212454
2014-07-07 13:28:31 +00:00
Alexey Bataev 4acb859fbd [OPENMP] Added initial support for 'omp parallel for'.
llvm-svn: 212453
2014-07-07 13:01:15 +00:00
Manuel Klimek 8a8b850c98 Increase argument limit of anyOf, allOf and eachOf from 5 to 9.
Patch by Alexey Sokolov.

llvm-svn: 212452
2014-07-07 12:55:16 +00:00
Alp Toker 9e0523d749 Move ChainedIncludesSource into the implementation
This doesn't need to be in the headers.

llvm-svn: 212451
2014-07-07 11:07:10 +00:00
Alp Toker 7eb95e21d7 ChainedIncludesSource: avoid copying n*(n+1)/2 file contents into memory
Just reference the data instead with shallow MemoryBuffer instances.

llvm-svn: 212450
2014-07-07 11:06:51 +00:00
Benjamin Kramer d0993e0077 InstCombine: Simplify code, no functionality change.
llvm-svn: 212449
2014-07-07 11:01:16 +00:00
Evgeniy Stepanov f0831ee8d2 [msan] Increase hash table size for chained origins.
llvm-svn: 212448
2014-07-07 10:45:15 +00:00
Yaron Keren 4e9d3c3aee PointerLoc does not exist anymore.
SourceLocation is available from TypeLoc member functions.

llvm-svn: 212447
2014-07-07 09:52:31 +00:00
Tobias Grosser 889c71e90f Revert "Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt (r212445)"
I misidentified the problem and did not test suffifiently. The files had
correctly been removed, but for some reason they still remained in my git
checkout. Not adding the files back to CMakeLists.txt, but rather removing
the stale files was the solution. Sorry for the unnecessary noise.

llvm-svn: 212446
2014-07-07 09:39:09 +00:00
Tobias Grosser e680eaf9e6 Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt
This fixes the cmake builds.

llvm-svn: 212445
2014-07-07 09:23:06 +00:00
Chandler Carruth 0dcb366268 [x86] Teach the new vector shuffle lowering code to handle what is
essentially a DAG combine that never gets a chance to run.

We might typically expect DAG combining to remove shuffles-of-splats and
other similar patterns, but we don't get a chance to run the DAG
combiner when we recursively form sub-shuffles during the lowering of
a shuffle. So instead hand-roll a really important combine directly into
the lowering code to detect shuffles-of-splats, especially shuffles of
an all-zero splat which needn't even have the same element width, etc.

This lets the new vector shuffle lowering handle shuffles which
implement things like zero-extension really nicely. This will become
even more important when I wire the legalization of zero-extension to
vector shuffles with the new widening legalization strategy.

llvm-svn: 212444
2014-07-07 09:06:58 +00:00
Tim Northover 55beb64bd0 CodeGen: it turns out that NAND is not the same thing as BIC. At all.
We've been performing the wrong operation on ARM for "atomicrmw nand" for
years, since "a NAND b" is "~(a & b)" rather than ARM's very tempting "a & ~b".
This bled over into the generic expansion pass.

So I assume no-one has ever actually tried to do an atomic nand in the real
world. Oh well.

llvm-svn: 212443
2014-07-07 09:06:35 +00:00
Alp Toker 03376dc2c5 Switch over a few uses of param_begin() to parameters()
llvm-svn: 212442
2014-07-07 09:02:20 +00:00
Alp Toker 221285bde7 Remove unused sys/stat.h includes
The facility was abstracted to LLVM in r187364.

llvm-svn: 212441
2014-07-07 08:37:15 +00:00
Evgeniy Stepanov 037f77092e [msan] Better hash function for chained origins.
llvm-svn: 212440
2014-07-07 08:31:55 +00:00
David Majnemer 611cdb9a63 CodeGen: Cleanup MS ABI RTTI LLVM IR
The MS ABI RTTI emission code would choose names for IR types like
%"MSRTTITypeDescriptor\02".  This name is undesirable because it
requires escaping; the underlying reason for this is that the name is
unprintable.  Fix this by naming it %rtti.TypeDescriptor2.

While here, stop trying to do lookups in the LLVM Module's type table.
Instead, store the IR types in MicrosoftCXXABI.  Lookups by name aren't
particularly fast.

llvm-svn: 212439
2014-07-07 08:09:15 +00:00
Alp Toker 1b070d25ca Peel away old-style file remapping typedefs and cruft
llvm-svn: 212438
2014-07-07 07:47:20 +00:00
Richard Smith a9a1c68a1b Fix an iterator invalidation issue: deserializing a key function can write to
the key functions table. Don't hold references to anything within that table
across such an access.

llvm-svn: 212437
2014-07-07 06:38:20 +00:00
David Majnemer f456e44211 StaticAnalyzer: Silence a warning
ExprEngine wasn't ready for SEHLeaveStmtClass.  Handle it like all the
other SEH constructs by aborting.

llvm-svn: 212436
2014-07-07 06:20:50 +00:00
David Majnemer e2cb8d198f CodeGen: Refactor RTTI emission
Let's not expose ABI specific minutia inside of CodeGenModule and Type.
Instead, let's abstract it through CXXABI.

This gets rid of:
CodeGenModule::getCompleteObjectLocator,
CodeGenModule::EmitFundamentalTypeDescriptor{s,},
CodeGenModule::getMSTypeDescriptor,
CodeGenModule::getMSCompleteObjectLocator,
CGCXXABI::shouldRTTIBeUnique,
CGCXXABI::classifyRTTIUniqueness.

CGRTTI was *almost* entirely centered around providing Itanium-style
RTTI information.  Instead of providing interfaces that only it
consumes, move it to the ItaniumCXXABI implementation file.  This allows
it to have access to Itanium-specific implementation details without
providing useless expansion points for the Microsoft ABI side.

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

llvm-svn: 212435
2014-07-07 06:20:47 +00:00
Alp Toker c358000ed3 Fix layering of file remapping and header search initialization
These two functions initialize the source manager and header search objects and
shouldn't be in InitPreprocessor which is concerned with priming the
preprocessor itself and predefining macros.

llvm-svn: 212434
2014-07-07 06:05:00 +00:00