Commit Graph

190256 Commits

Author SHA1 Message Date
Eric Christopher acf25766ad Grammar and spelling.
llvm-svn: 225740
2015-01-13 00:21:14 +00:00
Greg Fitzgerald 5a60ed7708 Remove fragile regex from test
Differential Revision: http://reviews.llvm.org/D6937

llvm-svn: 225739
2015-01-13 00:12:04 +00:00
Duncan P. N. Exon Smith e4c842f816 IR: Fix an inverted assertion when replacing resolved operands
Add a unit test, since this bug was only exposed by clang tests.  Thanks
to Rafael for tracking this down!

llvm-svn: 225738
2015-01-13 00:10:38 +00:00
Hans Wennborg 427e1214b4 Release merge script: don't actually commit the merge
Instead, just present the command for committing it. This way,
the user can test the merge locally, resolve conflicts, etc.
before committing, which seems much safer to me.

llvm-svn: 225737
2015-01-13 00:07:31 +00:00
Hans Wennborg 68aaa4daf5 Release tag script: add -revision option
It seems useful to be able to create the branch at a revision that looks good
on the buildbots.

llvm-svn: 225736
2015-01-13 00:07:29 +00:00
Hans Wennborg 332c4b7ee9 Release tag script: add -dry-run flag
llvm-svn: 225735
2015-01-13 00:07:22 +00:00
Adrian Prantl 66f2595845 Debug Info: Move support for constants into DwarfExpression.
Move the declaration of DebugLocDwarfExpression into DwarfExpression.h
because it needs to be accessed from AsmPrinterDwarf.cpp and DwarfDebug.cpp

NFC.

llvm-svn: 225734
2015-01-13 00:04:06 +00:00
Oleksiy Vyalov 1777c12206 Fix XCode build on OSX - add OptionValueChar.cpp
http://reviews.llvm.org/D6941

llvm-svn: 225733
2015-01-12 23:50:51 +00:00
Duncan P. N. Exon Smith a6de6a4013 IR: Split out writeMDTuple(), NFC
Prepare for more subclasses of `UniquableMDNode` than `MDTuple`.

llvm-svn: 225732
2015-01-12 23:45:31 +00:00
Adrian Prantl a4c30d6509 Make DwarfExpression store the AsmPrinter instead of the TargetMachine.
NFC.

llvm-svn: 225731
2015-01-12 23:36:56 +00:00
Adrian Prantl 9cffbd8daa remove extra semicolon
llvm-svn: 225730
2015-01-12 23:36:50 +00:00
Reid Kleckner bba20f06de musttail: Only set the inreg flag for fastcall and vectorcall
Otherwise we'll attempt to forward ECX, EDX, and EAX for cdecl and
stdcall thunks, leaving us with no scratch registers for indirect call
targets.

Fixes PR22052.

llvm-svn: 225729
2015-01-12 23:28:23 +00:00
Matt Arsenault 64dae8354b R600/SI: Remove redundant setting expand on f64 vectors
None of these are legal types already, so they default to
Expand.

llvm-svn: 225728
2015-01-12 23:13:00 +00:00
Duncan P. N. Exon Smith b3ff1cbc08 IR: Unbreak the MSVC build after r225689
llvm-svn: 225727
2015-01-12 23:09:14 +00:00
Adrian Prantl 337e360279 Run clang-format on the parts of AsmPrinterDwarf where it improves the
readability.

llvm-svn: 225726
2015-01-12 23:03:23 +00:00
Alexey Samsonov f3b61be2ee Update test cases for new -fsanitize-recover= semantics.
llvm-svn: 225725
2015-01-12 23:02:42 +00:00
Adrian Prantl 0fec811d7b Debug Info: Add a virtual destructor to DwarfExpression.
Thanks Chandler for noticing!

llvm-svn: 225724
2015-01-12 22:59:28 +00:00
Chandler Carruth 2482fe0b52 [PM] Sink the reference vs. value decision for IR units out of the
templated interface.

So far, every single IR unit I can come up with has address-identity.
That is, when two units of IR are both active in LLVM, their addresses
will be distinct of the IR is distinct. This is clearly true for
Modules, Functions, BasicBlocks, and Instructions. It turns out that the
only practical way to make the CGSCC stuff work the way we want is to
make it true for SCCs as well. I expect this pattern to continue.

When first designing the pass manager code, I kept this dimension of
freedom in the type parameters, essentially allowing for a wrapper-type
whose address did not form identity. But that really no longer makes
sense and is making the code more complex or subtle for no gain. If we
ever have an actual use case for this, we can figure out what makes
sense then and there. It will be better because then we will have the
actual example in hand.

While the simplifications afforded in this patch are fairly small
(mostly sinking the '&' out of many type parameters onto a few
interfaces), it would have become much more pronounced with subsequent
changes. I have a sequence of changes that will completely remove the
code duplication that currently exists between all of the pass managers
and analysis managers. =] Should make things much cleaner and avoid bug
fixing N times for the N pass managers.

llvm-svn: 225723
2015-01-12 22:53:31 +00:00
Duncan P. N. Exon Smith 3f0ad4a80e IR: Remove incorrect comment, NFC
llvm-svn: 225722
2015-01-12 22:53:18 +00:00
Duncan P. N. Exon Smith 380902ef6b IR: Fix unit test memory leak reported by ASan
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/603/steps/check-llvm%20asan/logs/stdio

Thanks Alexey for pointing me to this!

llvm-svn: 225721
2015-01-12 22:46:15 +00:00
Adrian Prantl 0d5df0ac1c Untwine this expression. Thanks to David for noticing!
llvm-svn: 225720
2015-01-12 22:39:14 +00:00
Alexey Samsonov 8845952b54 Reimplement -fsanitize-recover family of flags.
Introduce the following -fsanitize-recover flags:
  - -fsanitize-recover=<list>: Enable recovery for selected checks or
      group of checks. It is forbidden to explicitly list unrecoverable
      sanitizers here (that is, "address", "unreachable", "return").
  - -fno-sanitize-recover=<list>: Disable recovery for selected checks or
     group of checks.
  - -f(no-)?sanitize-recover is now a synonym for
    -f(no-)?sanitize-recover=undefined,integer and will soon be deprecated.

These flags are parsed left to right, and mask of "recoverable"
sanitizer is updated accordingly, much like what we do for -fsanitize= flags.
-fsanitize= and -fsanitize-recover= flag families are independent.

CodeGen change: If there is a single UBSan handler function, responsible
for implementing multiple checks, which have different recoverable setting,
then we emit two handler calls instead of one:
the first one for the set of "unrecoverable" checks, another one - for
set of "recoverable" checks. If all checks implemented by a handler have the
same recoverability setting, then the generated code will be the same.

llvm-svn: 225719
2015-01-12 22:39:12 +00:00
Simon Pilgrim d88ab87064 [X86][SSE] Minor regression fix for r225551
r225551 vector byte shuffle optimization caused an assertion as fully zeroable vectors can be produced under certain circumstances. This fix drops the assert and returns a zero vector where the assert would have failed.

llvm-svn: 225718
2015-01-12 22:38:08 +00:00
Adrian Prantl 0e6ffb9d0d Debug Info: Implement DwarfUnit::addRegisterOpPiece() using DwarfExpression.
NFC.

llvm-svn: 225717
2015-01-12 22:37:16 +00:00
Duncan P. N. Exon Smith 49503f827d Bitcode: Range-based for, NFC
llvm-svn: 225716
2015-01-12 22:35:34 +00:00
Duncan P. N. Exon Smith b1ad5d39a9 Bitcode: Add abbreviation for METADATA_NAME
llvm-svn: 225715
2015-01-12 22:34:10 +00:00
Duncan P. N. Exon Smith f8dd6ad6de Bitcode: Range-based for, NFC
llvm-svn: 225714
2015-01-12 22:33:00 +00:00
Duncan P. N. Exon Smith 73d5aae74c Bitcode: Range-based for, NFC
llvm-svn: 225713
2015-01-12 22:31:35 +00:00
Duncan P. N. Exon Smith 2fcf60e78e Bitcode: Simplify emission of METADATA_BLOCK
Refactor logic so that we know up-front whether to open a block and
whether we need an MDString abbreviation.

This is almost NFC, but will start emitting `MDString` abbreviations
when the first record is not an `MDString`.

llvm-svn: 225712
2015-01-12 22:30:34 +00:00
Duncan P. N. Exon Smith 0b31dd1d67 AsmParser: Use subclass API instead of MDNode wrappers, NFC
Use subclass API instead of the wrappers in `MDNode` in the assembly
parser.  This will make the code easier to follow once we have multiple
subclasses.

llvm-svn: 225711
2015-01-12 22:27:39 +00:00
Duncan P. N. Exon Smith f825dae836 AsmParser: Factor duplicated code into ParseMDNode(), NFC
llvm-svn: 225710
2015-01-12 22:26:48 +00:00
Duncan P. N. Exon Smith 62a7919f6b AsmParser: Reorder ParseMetadata() logic, NFC
llvm-svn: 225709
2015-01-12 22:24:50 +00:00
Duncan P. N. Exon Smith dbcff30bd1 AsmParser: Simplify ParseMDTuple(), NFC
llvm-svn: 225708
2015-01-12 22:23:04 +00:00
Adrian Prantl 00dbc2a7d3 Debug Info: Implement DwarfUnit::addRegisterOffset using DwarfExpression.
No functional change.

llvm-svn: 225707
2015-01-12 22:19:26 +00:00
Adrian Prantl b16d9ebb0c Debug info: Factor out the creation of DWARF expressions from AsmPrinter
into a new class DwarfExpression that can be shared between AsmPrinter
and DwarfUnit.

This is the first step towards unifying the two entirely redundant
implementations of dwarf expression emission in DwarfUnit and AsmPrinter.

Almost no functional change — Testcases were updated because asm comments
that used to be on two lines now appear on the same line, which is
actually preferable.

llvm-svn: 225706
2015-01-12 22:19:22 +00:00
Rafael Espindola 0d4fb98504 [patch][pr19848] Produce explicit comdats in clang.
The llvm IR until recently had no support for comdats. This was a problem when
targeting C++ on ELF/COFF as just using weak linkage would cause quite a bit of
dead bits to remain on the executable (unless -ffunction-sections,
-fdata-sections and --gc-sections were used).

To fix the problem, llvm's codegen will just assume that any weak or linkonce
that is not in an explicit comdat should be output in one with the same name as
the global.

This unfortunately breaks cases like pr19848 where a weak symbol is not
xpected to be part of any comdat.

Now that we have explicit comdats in the IR, we can finally get both cases
right.

This first patch just makes clang give explicit comdats to GlobalValues where
t is allowed to.

A followup patch to llvm will then stop implicitly producing comdats.

llvm-svn: 225705
2015-01-12 22:13:53 +00:00
Greg Fitzgerald cedca2f057 Remove CMake standalone build configuration
Differential Revision: http://reviews.llvm.org/D6898

llvm-svn: 225704
2015-01-12 21:41:10 +00:00
Nico Weber 0a02992dc0 Wrap to 80 columns. No behavior change.
llvm-svn: 225703
2015-01-12 21:24:10 +00:00
Duncan P. N. Exon Smith 58ef9d142a AsmParser: ParseMDNode() => ParseMDTuple(), NFC
This isn't parsing arbitrary subclasses of `MDNode`, just `MDTuple`.

llvm-svn: 225702
2015-01-12 21:23:11 +00:00
Nico Weber f867c17ab5 Don't use a doc comment in a function body.
llvm-svn: 225701
2015-01-12 21:22:27 +00:00
Sanjay Patel 06d5589a84 80-cols; NFC
llvm-svn: 225700
2015-01-12 21:21:28 +00:00
Duncan P. N. Exon Smith a8d9a026d9 AsmParser: Remove unused version of ParseMDNodeID()
Merge the two versions of `ParseMDNodeID()` now that no one needs
special forward references.

llvm-svn: 225699
2015-01-12 21:14:38 +00:00
Duncan P. N. Exon Smith ab617d5977 AsmParser: Use normal references for metadata attachments, NFC
Remove special parsing logic for metadata attachments.  Now that
`DebugLoc` is stored normally (since the metadata/value split), we don't
need this special forward referencing logic.

llvm-svn: 225698
2015-01-12 21:13:09 +00:00
Duncan P. N. Exon Smith bf68e80d06 IR: Prepare for a new UniquableMDNode subclass, NFC
Add generic dispatch for the parts of `UniquableMDNode` that cast to
`MDTuple`.  This makes adding other subclasses (like PR21433's
`MDLocation`) easier.

llvm-svn: 225697
2015-01-12 20:56:33 +00:00
Duncan P. N. Exon Smith 6b1f4659f9 IR: Stop erasing MDNodes from uniquing sets during teardown
Stop erasing `MDNode`s from the uniquing sets in `LLVMContextImpl`
during teardown (in particular, during
`UniquableMDNode::~UniquableMDNode()`).  Although it's currently
feasible, there isn't any clear benefit and it may not be feasible for
other subclasses (which don't explicitly store the lookup hash).

llvm-svn: 225696
2015-01-12 20:50:25 +00:00
Bill Schmidt a2dece27e4 First crack at PowerPC 3.6 release notes
llvm-svn: 225695
2015-01-12 20:46:43 +00:00
Zachary Turner 3e7442b676 Add support for character option types.
This will allow, in a subsequent patch, the addition of a global
setting that allows the user to specify a single character that
LLDB will recognize as an escape character when processing arg
strings to accomodate differences in Windows/non-Windows path
handling.

Differential Revision: http://reviews.llvm.org/D6887
Reviewed by: Jim Ingham

llvm-svn: 225694
2015-01-12 20:44:02 +00:00
Eric Fiselier ffbadedcf9 [LIT] Remove string decoding in gtest discovery code. lit.util.capture now does decoding.
llvm-svn: 225693
2015-01-12 20:43:34 +00:00
Peter Collingbourne 75e259ed95 [dfsan] Export dfsan_get_label_info function with C linkage.
llvm-svn: 225692
2015-01-12 20:40:30 +00:00
Ahmed Bougacha 291833b959 [X86] Also create+widen FMIN/FMAX nodes for v2f32.
This happens in the HINT benchmark, where the SLP-vectorizer created
v2f32 fcmp/select code.  The "correct" solution would have been to
teach the vectorizer cost model that v2f32 isn't legal (because really,
it isn't), but if we can vectorize we might as well do so.

We legalize these v2f32 FMIN/FMAX nodes by widening to v4f32 later on.
v3f32 were already widened to v4f32 by the generic unroll-and-build-vector
legalization.

rdar://15763436
Differential Revision: http://reviews.llvm.org/D6557

llvm-svn: 225691
2015-01-12 20:31:30 +00:00