platform/upstream/llvm.git
9 years agoAdd flag to request codeview debug info on Windows
Reid Kleckner [Wed, 5 Aug 2015 22:48:26 +0000 (22:48 +0000)]
Add flag to request codeview debug info on Windows

Needed after fixing PR22032.

llvm-svn: 244162

9 years agofunction_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
Richard Smith [Wed, 5 Aug 2015 22:41:45 +0000 (22:41 +0000)]
function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
useless return value. Switch to using it directly when completing the
redeclaration chain for an anonymous declaration, and reduce the set of
declarations that we load in the process to just those of the right kind.

llvm-svn: 244161

9 years ago[dsymutil] Add support for the -arch option.
Frederic Riss [Wed, 5 Aug 2015 22:33:28 +0000 (22:33 +0000)]
[dsymutil] Add support for the -arch option.

This option allows to select a subset of the architectures when
performing a universal binary link. The filter is done completely
in the mach-o specific part of the code.

llvm-svn: 244160

9 years agoFix Windows test failure with triple instead of using the native OS
Reid Kleckner [Wed, 5 Aug 2015 22:27:08 +0000 (22:27 +0000)]
Fix Windows test failure with triple instead of using the native OS

llvm-svn: 244159

9 years agoIf the "CodeView" module flag is set, emit codeview instead of DWARF
Reid Kleckner [Wed, 5 Aug 2015 22:26:20 +0000 (22:26 +0000)]
If the "CodeView" module flag is set, emit codeview instead of DWARF

Summary:
Emit both DWARF and CodeView if "CodeView" and "Dwarf Version" module
flags are set.

Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 244158

9 years agoMIR Serialization: Serialize the machine operand's offset.
Alex Lorenz [Wed, 5 Aug 2015 22:26:15 +0000 (22:26 +0000)]
MIR Serialization: Serialize the machine operand's offset.

This commit serializes the offset for the following operands: target index,
global address, external symbol, constant pool index, and block address.

llvm-svn: 244157

9 years agoAdd <numeric> header for use of std::accumulate().
Cong Hou [Wed, 5 Aug 2015 22:13:43 +0000 (22:13 +0000)]
Add <numeric> header for use of std::accumulate().

llvm-svn: 244156

9 years agoDivide the primitive size in bits by eight so the initial load's alignment is in
Richard Diamond [Wed, 5 Aug 2015 22:10:57 +0000 (22:10 +0000)]
Divide the primitive size in bits by eight so the initial load's alignment is in
bytes as expected. Tested with the included unit test.

llvm-svn: 244155

9 years agoRecord whether the weights on out-edges from a MBB are normalized.
Cong Hou [Wed, 5 Aug 2015 22:01:20 +0000 (22:01 +0000)]
Record whether the weights on out-edges from a MBB are normalized.

1. Create a utility function normalizeEdgeWeights() in MachineBranchProbabilityInfo that normalizes a list of edge weights so that the sum of then can fit in uint32_t.
2. Provide an interface in MachineBasicBlock to normalize its successors' weights.
3. Add a flag in MachineBasicBlock that tracks whether its successors' weights are normalized.
4. Provide an overload of getSumForBlock that accepts a non-const pointer to a MBB so that it can force normalizing this MBB's successors' weights.
5. Update several uses of getSumForBlock() by eliminating the once needed weight scale.

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

llvm-svn: 244154

9 years agoAdd flags to disable profile generation.
Diego Novillo [Wed, 5 Aug 2015 21:49:51 +0000 (21:49 +0000)]
Add flags to disable profile generation.

This patch adds flags -fno-profile-instr-generate and
-fno-profile-instr-use, and the GCC aliases -fno-profile-generate and
-fno-profile-use.

These flags are used in situations where users need to disable profile
generation or use for specific files in a build, without affecting other
files.

llvm-svn: 244153

9 years ago[libFuzzer] add option -report_slow_units=Nsec to control when slow units are printed
Kostya Serebryany [Wed, 5 Aug 2015 21:43:48 +0000 (21:43 +0000)]
[libFuzzer] add option -report_slow_units=Nsec to control when slow units are printed

llvm-svn: 244152

9 years ago[libFuzzer] add a missing test file
Kostya Serebryany [Wed, 5 Aug 2015 21:32:13 +0000 (21:32 +0000)]
[libFuzzer] add a missing test file

llvm-svn: 244151

9 years agoReword a comment about IncludeDirGroup. NFC
Douglas Katzman [Wed, 5 Aug 2015 21:31:54 +0000 (21:31 +0000)]
Reword a comment about IncludeDirGroup. NFC

Referring to the groups by mixing the enumerated name
with the command-line flag was not as clear as could be.

llvm-svn: 244150

9 years ago[sanitizer] Add the flag handle_sigfpe that is default true to handle SIGFPE crashes...
Kostya Serebryany [Wed, 5 Aug 2015 21:19:11 +0000 (21:19 +0000)]
[sanitizer] Add the flag handle_sigfpe that is default true to handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski

llvm-svn: 244136

9 years agoDrop the defaulted CallGraph move ctor, since it's unused and MSVC doesn't support...
David Blaikie [Wed, 5 Aug 2015 21:16:46 +0000 (21:16 +0000)]
Drop the defaulted CallGraph move ctor, since it's unused and MSVC doesn't support defaulted move ops

llvm-svn: 244135

9 years agoReplace &vector[0] with vector.data() to avoid invalid dereference caught by debug...
Nick Lewycky [Wed, 5 Aug 2015 21:16:02 +0000 (21:16 +0000)]
Replace &vector[0] with vector.data() to avoid invalid dereference caught by debug STL. Also move a '*' for consistency and fix an 80-col violation.

llvm-svn: 244134

9 years ago-Wdeprecated: Remove some dead code that was relying on a questionable (rule-of-3...
David Blaikie [Wed, 5 Aug 2015 21:15:48 +0000 (21:15 +0000)]
-Wdeprecated: Remove some dead code that was relying on a questionable (rule-of-3-violating) copy ctor in MCInstPrinter

llvm-svn: 244133

9 years ago[LoopUnswitch] Preserve make.implicit metadata for unswitched conditions
Chen Li [Wed, 5 Aug 2015 21:13:26 +0000 (21:13 +0000)]
[LoopUnswitch] Preserve make.implicit metadata for unswitched conditions

Summary: This patch adds support to preserve make.implicit metadata for unswitched conditions in loop pre-header.

Reviewers: sanjoy, weimingz

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 244132

9 years agoRemove unused header includes.
Eric Christopher [Wed, 5 Aug 2015 21:11:56 +0000 (21:11 +0000)]
Remove unused header includes.

llvm-svn: 244131

9 years ago[Hexagon] Edit a comment. NFC
Krzysztof Parzyszek [Wed, 5 Aug 2015 21:08:26 +0000 (21:08 +0000)]
[Hexagon] Edit a comment. NFC

llvm-svn: 244130

9 years ago-Wdeprecated clean by making LogBuilder move constructible so it can be returned...
David Blaikie [Wed, 5 Aug 2015 21:06:50 +0000 (21:06 +0000)]
-Wdeprecated clean by making LogBuilder move constructible so it can be returned by value (in DifferenceEngine::logf)

llvm-svn: 244129

9 years agox86 atomic: optimize a.store(reg op a.load(acquire), release)
JF Bastien [Wed, 5 Aug 2015 21:04:59 +0000 (21:04 +0000)]
x86 atomic: optimize a.store(reg op a.load(acquire), release)

Summary: PR24191 finds that the expected memory-register operations aren't generated when relaxed { load ; modify ; store } is used. This is similar to PR17281 which was addressed in D4796, but only for memory-immediate operations (and for memory orderings up to acquire and release). This patch also handles some floating-point operations.

Reviewers: reames, kcc, dvyukov, nadav, morisset, chandlerc, t.p.northover, pete

Subscribers: llvm-commits

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

llvm-svn: 244128

9 years ago[PM] Remove a failed attempt to port the CallGraph analysis to the new
Chandler Carruth [Wed, 5 Aug 2015 21:04:31 +0000 (21:04 +0000)]
[PM] Remove a failed attempt to port the CallGraph analysis to the new
pass manager.

This never worked, and won't ever work. It was actually why I ended up
building the LazyCallGraph set of code which is more more effectively
wired up to the new pass manager. This accidentally got committed when
I was trying to land a cleanup of the code organization in the other
parts of this file. =[ My bad, but fortunately Dave was keen eyed enough
to spot that this code couldn't possibly work. =]

llvm-svn: 244127

9 years agoRename builtin_lang -> Langs to match the rest of the code a bit better.
Eric Christopher [Wed, 5 Aug 2015 21:04:28 +0000 (21:04 +0000)]
Rename builtin_lang -> Langs to match the rest of the code a bit better.

llvm-svn: 244126

9 years agoRemove unused function GetBuiltinNames.
Eric Christopher [Wed, 5 Aug 2015 21:04:24 +0000 (21:04 +0000)]
Remove unused function GetBuiltinNames.

llvm-svn: 244125

9 years agoDocumentation: fix another typo, "arrays types" -> "array types".
James Dennett [Wed, 5 Aug 2015 20:58:23 +0000 (20:58 +0000)]
Documentation: fix another typo, "arrays types" -> "array types".

Thanks to Kim Gräsman <kim.grasman@gmail.com> for pointing this out.

llvm-svn: 244124

9 years agoUpdate GettingStarted docs list of LLVM_TARGETS_TO_BUILD to match cmake.
Pete Cooper [Wed, 5 Aug 2015 20:55:53 +0000 (20:55 +0000)]
Update GettingStarted docs list of LLVM_TARGETS_TO_BUILD to match cmake.

Since the docs were written, we've added the BPF backend to the list.
Updating the docs to take this in to account.  Also sorted them to
match cmake while I was changing these lines.

Reviewed by Chris B.

llvm-svn: 244123

9 years ago-Wdeprecated cleanup: Make CallGraph movable by default by using unique_ptr members...
David Blaikie [Wed, 5 Aug 2015 20:55:50 +0000 (20:55 +0000)]
-Wdeprecated cleanup: Make CallGraph movable by default by using unique_ptr members rather than raw pointers.

The only place that tries to return a CallGraph by value
(CallGraphAnalysis::run) doesn't seem to be used right now, but it's a
reasonable bit of cleanup anyway.

llvm-svn: 244122

9 years agoRevert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem...
JF Bastien [Wed, 5 Aug 2015 20:53:56 +0000 (20:53 +0000)]
Revert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk."

I mistakenly committed the patch for D6629, and was trying to commit another. Reverting until it gets proper signoff.

llvm-svn: 244121

9 years agoFix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed...
JF Bastien [Wed, 5 Aug 2015 20:49:46 +0000 (20:49 +0000)]
Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk.

llvm-svn: 244120

9 years ago[CMake] Add USES_TERMINAL 1 to ExternalProject_Add_Step calls on 3.3.20150708 and...
Chris Bieneman [Wed, 5 Aug 2015 20:46:39 +0000 (20:46 +0000)]
[CMake] Add USES_TERMINAL 1 to ExternalProject_Add_Step calls on 3.3.20150708 and later.

llvm-svn: 244119

9 years ago-Wdeprecated-clean: Remove uses of throw() in favor of noexcept
David Blaikie [Wed, 5 Aug 2015 20:38:57 +0000 (20:38 +0000)]
-Wdeprecated-clean: Remove uses of throw() in favor of noexcept

llvm-svn: 244115

9 years agoNFC.
Cong Hou [Wed, 5 Aug 2015 20:30:11 +0000 (20:30 +0000)]
NFC.

Convert comments in MachineBasicBlock.h into new style.

llvm-svn: 244113

9 years ago-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated...
David Blaikie [Wed, 5 Aug 2015 20:20:29 +0000 (20:20 +0000)]
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11

LoadedObjectInfo was depending on the implicit copy ctor in the presence
of a user-declared dtor. Default (and protect) it in the base class and
make the devired classes final to avoid any risk of a public API that
would enable slicing.

llvm-svn: 244112

9 years agoRemove unused comparison operators from the Builtin Info struct.
Eric Christopher [Wed, 5 Aug 2015 20:11:04 +0000 (20:11 +0000)]
Remove unused comparison operators from the Builtin Info struct.

llvm-svn: 244111

9 years agoRemove unnecessary ClangLibdirSuffix variable.
Yaron Keren [Wed, 5 Aug 2015 20:06:56 +0000 (20:06 +0000)]
Remove unnecessary ClangLibdirSuffix variable.
Twine + const char * is supported.

llvm-svn: 244110

9 years agoHandle writeImportLibrary failing.
Rafael Espindola [Wed, 5 Aug 2015 20:03:57 +0000 (20:03 +0000)]
Handle writeImportLibrary failing.

We were printing an error but exiting with 0.

Not sure how to test this. We could add a no-winlib feature,
but that is probably not worth it.

llvm-svn: 244109

9 years agoRevert "Fix `llvm-config` to emit the linker flag for the combined shared object...
Richard Diamond [Wed, 5 Aug 2015 20:03:26 +0000 (20:03 +0000)]
Revert "Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components."

It seems I was wrong thinking `autoconf`/`make` only installed shared libraries if configured with `--enable-shared`, even if `--disable-static` is present. I'll re-address with a followup patch.

This reverts commit r243297 for causing PR#24154.

llvm-svn: 244108

9 years agolit fixes for lld.
Rafael Espindola [Wed, 5 Aug 2015 19:55:17 +0000 (19:55 +0000)]
lit fixes for lld.

It was not using LLVM_LIT_TOOLS_DIR and at least on my VM never finding lib.exe.

With this all the COFF tests show up as supported and pass.

llvm-svn: 244107

9 years agoCOFF: Fix bad #includes.
Rui Ueyama [Wed, 5 Aug 2015 19:51:28 +0000 (19:51 +0000)]
COFF: Fix bad #includes.

Writer.h is intended to be included only by Writer.cpp and Driver.cpp.
Use of the header in other files are bad.

llvm-svn: 244106

9 years ago[AArch64] Stable runtime required for proc maps test
Renato Golin [Wed, 5 Aug 2015 19:45:26 +0000 (19:45 +0000)]
[AArch64] Stable runtime required for proc maps test

llvm-svn: 244105

9 years agoDocumentation: fix a typo, "This flag is determines" -> "This flag determines".
James Dennett [Wed, 5 Aug 2015 19:44:47 +0000 (19:44 +0000)]
Documentation: fix a typo, "This flag is determines" -> "This flag determines".

No functional change.

llvm-svn: 244104

9 years agoWrite access test.
Richard Diamond [Wed, 5 Aug 2015 19:40:39 +0000 (19:40 +0000)]
Write access test.

llvm-svn: 244103

9 years agoCOFF: ARM: Implepment BLX23T relocation and fix Branch20T.
Rui Ueyama [Wed, 5 Aug 2015 19:40:07 +0000 (19:40 +0000)]
COFF: ARM: Implepment BLX23T relocation and fix Branch20T.

I fed the same test to MSVC linker and got the same output,
so I believe this implementation is correct.

llvm-svn: 244102

9 years ago[UBSan] Fix UBSan-vptr false positive.
Alexey Samsonov [Wed, 5 Aug 2015 19:35:46 +0000 (19:35 +0000)]
[UBSan] Fix UBSan-vptr false positive.

Offset from vptr to the start of most-derived object can actually
be positive in some virtual base class vtables.

Patch by Stephan Bergmann!

llvm-svn: 244101

9 years agoMIR Parser: Report an error when parsing large immediate operands.
Alex Lorenz [Wed, 5 Aug 2015 19:03:42 +0000 (19:03 +0000)]
MIR Parser: Report an error when parsing large immediate operands.

llvm-svn: 244100

9 years ago[sanitizer] fix the Mac build (hopefully)
Kostya Serebryany [Wed, 5 Aug 2015 18:56:42 +0000 (18:56 +0000)]
[sanitizer] fix the Mac build (hopefully)

llvm-svn: 244099

9 years agoMIR Serialization: Serialize the typed immediate integer machine operands.
Alex Lorenz [Wed, 5 Aug 2015 18:52:21 +0000 (18:52 +0000)]
MIR Serialization: Serialize the typed immediate integer machine operands.

llvm-svn: 244098

9 years agoAdd -gcodeview and -gdwarf to control which type Clang emits
Reid Kleckner [Wed, 5 Aug 2015 18:51:13 +0000 (18:51 +0000)]
Add -gcodeview and -gdwarf to control which type Clang emits

Summary:
By default, 'clang' emits dwarf and 'clang-cl' emits codeview.  You can
force emission of one or both by passing -gcodeview and -gdwarf to
either driver.

Reviewers: dblaikie, hans

Subscribers: cfe-commits

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

llvm-svn: 244097

9 years ago[Unroll] Switch to using 'int' cost types in preparation for a somewhat
Chandler Carruth [Wed, 5 Aug 2015 18:46:21 +0000 (18:46 +0000)]
[Unroll] Switch to using 'int' cost types in preparation for a somewhat
more involved change to the cost computation pattern.

llvm-svn: 244095

9 years ago[dsymutil] Fix test patterns.
Frederic Riss [Wed, 5 Aug 2015 18:45:13 +0000 (18:45 +0000)]
[dsymutil] Fix test patterns.

Depending on the filesystem paths, the YAML dump might quote paths.
Account for that in the regex patterns.

llvm-svn: 244094

9 years agoMIR Parser: Extract the IR constant parsing code into a new method. NFC.
Alex Lorenz [Wed, 5 Aug 2015 18:44:00 +0000 (18:44 +0000)]
MIR Parser: Extract the IR constant parsing code into a new method. NFC.

This commit extracts the code that parses the IR constant values into a new
method named 'parseIRConstant' in the 'MIParser' class. The new method will
be reused by the code that parses the typed integer immediate machine operands.

llvm-svn: 244093

9 years ago[AArch64] Enable thread sanitizer on clang
Renato Golin [Wed, 5 Aug 2015 18:42:41 +0000 (18:42 +0000)]
[AArch64] Enable thread sanitizer on clang

With this option, clang can use -fsanitize=thread on AArch64.

Patch by Adhemerval Zanella.

llvm-svn: 244091

9 years ago[Hexagon] Implement TargetTransformInfo for Hexagon
Krzysztof Parzyszek [Wed, 5 Aug 2015 18:35:37 +0000 (18:35 +0000)]
[Hexagon] Implement TargetTransformInfo for Hexagon

Author: Brendon Cahoon <bcahoon@codeaurora.org>
llvm-svn: 244089

9 years ago[AArch64] Fixes broken bot fue to TSAN patch
Renato Golin [Wed, 5 Aug 2015 18:34:20 +0000 (18:34 +0000)]
[AArch64] Fixes broken bot fue to TSAN patch

Patch by Adhemerval Zanella.

llvm-svn: 244088

9 years ago[dsymutil] Implement support for handling mach-o universal binaries as main input...
Frederic Riss [Wed, 5 Aug 2015 18:27:44 +0000 (18:27 +0000)]
[dsymutil] Implement support for handling mach-o universal binaries as main input/output.

The DWARF linker isn't touched by this, the implementation links
individual files and merges them together into a fat binary by
calling out to the 'lipo' utility.

The main change is that the MachODebugMapParser can now return
multiple debug maps for a single binary.

The test just verifies that lipo would be invoked correctly, but
doesn't actually generate a binary. This mimics the way clang
tests its external iplatform tools integration.

llvm-svn: 244087

9 years ago[dsymutil] Introduce exit helper. NFC.
Frederic Riss [Wed, 5 Aug 2015 18:27:38 +0000 (18:27 +0000)]
[dsymutil] Introduce exit helper. NFC.

llvm-dsymutil will start creating temporary files in a followup
commit. To ease the correct cleanup of this files, introduce a
helper called to exit dsymutil.

llvm-svn: 244086

9 years ago[dsymutil] Split some logic into a helper function. NFC
Frederic Riss [Wed, 5 Aug 2015 18:27:34 +0000 (18:27 +0000)]
[dsymutil] Split some logic into a helper function. NFC

llvm-svn: 244085

9 years ago[libFuzzer] use data-flow feedback from strcmp
Kostya Serebryany [Wed, 5 Aug 2015 18:23:01 +0000 (18:23 +0000)]
[libFuzzer] use data-flow feedback from strcmp

llvm-svn: 244084

9 years ago[libFuzzer] add weak hooks for strcmp
Kostya Serebryany [Wed, 5 Aug 2015 18:20:54 +0000 (18:20 +0000)]
[libFuzzer] add weak hooks for strcmp

llvm-svn: 244083

9 years ago[libFuzzer/DFSan] add more __sanitizer callbacks to dfsan blacklist
Kostya Serebryany [Wed, 5 Aug 2015 18:20:15 +0000 (18:20 +0000)]
[libFuzzer/DFSan] add more __sanitizer callbacks to dfsan blacklist

llvm-svn: 244082

9 years agoMIR Parser: Report an error when parsing duplicate register flags.
Alex Lorenz [Wed, 5 Aug 2015 18:09:03 +0000 (18:09 +0000)]
MIR Parser: Report an error when parsing duplicate register flags.

llvm-svn: 244081

9 years ago[TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'
Chandler Carruth [Wed, 5 Aug 2015 18:08:10 +0000 (18:08 +0000)]
[TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'
rather than 'unsigned' for their costs.

For something like costs in particular there is a natural "negative"
value, that of savings or saved cost. As a consequence, there is a lot
of code that subtracts or creates negative values based on cost, all of
which is prone to awkwardness or bugs when dealing with an unsigned
type. Similarly, we *never* want these values to wrap, as that would
cause Very Bad code generation (likely percieved as an infinite loop as
we try to emit over 2^32 instructions or some such insanity).

All around 'int' seems a much better fit for these basic metrics. I've
added asserts to ensure that at least the TTI interface never returns
negative numbers here. If we ever have a use case for negative numbers,
we can remove this, but this way a bug where someone used '-1' to
produce a 'very large' cost will be caught by the assert.

This passes all tests, and is also UBSan clean.

No functional change intended.

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

llvm-svn: 244080

9 years agoClaim arguments that belong to 'clang_ignored_gcc_optimization_f_Group'
Douglas Katzman [Wed, 5 Aug 2015 18:03:47 +0000 (18:03 +0000)]
Claim arguments that belong to 'clang_ignored_gcc_optimization_f_Group'

This seems preferable to printing two warnings per unsupported option-
one warning about not supporting it, and one about not using it.
It also makes the '-Wno-' option do what you mean.

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

llvm-svn: 244079

9 years ago[GMR] Teach the conservative path of GMR to catch even more easy cases.
Chandler Carruth [Wed, 5 Aug 2015 17:58:30 +0000 (17:58 +0000)]
[GMR] Teach the conservative path of GMR to catch even more easy cases.

In PR24288 it was pointed out that the easy case of a non-escaping
global and something that *obviously* required an escape sometimes is
hidden behind PHIs (or selects in theory). Because we have this binary
test, we can easily just check that all possible input values satisfy
the requirement. This is done with a (very small) recursion through PHIs
and selects. With this, the specific example from the PR is correctly
folded by GVN.

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

llvm-svn: 244078

9 years agoTry to fix sanitizer_win.cc compile error on 64-bit after r243895
Hans Wennborg [Wed, 5 Aug 2015 17:55:26 +0000 (17:55 +0000)]
Try to fix sanitizer_win.cc compile error on 64-bit after r243895

llvm-svn: 244077

9 years ago[test] Attempt a change to see if it fixes the test for the windows bot.
Argyrios Kyrtzidis [Wed, 5 Aug 2015 17:52:57 +0000 (17:52 +0000)]
[test] Attempt a change to see if it fixes the test for the windows bot.

llvm-svn: 244076

9 years agoMIR Serialization: Serialize the 'early-clobber' register operand flag.
Alex Lorenz [Wed, 5 Aug 2015 17:49:03 +0000 (17:49 +0000)]
MIR Serialization: Serialize the 'early-clobber' register operand flag.

llvm-svn: 244075

9 years agoMove BB succ_iterator to be inside TerminatorInst. NFC.
Pete Cooper [Wed, 5 Aug 2015 17:43:01 +0000 (17:43 +0000)]
Move BB succ_iterator to be inside TerminatorInst.  NFC.

To get the successors of a BB we currently do successors(BB) which
ultimately walks the successors of the BB's terminator.

This moves the iterator to TerminatorInst as thats what we're actually
using to do the iteration, and adds a member function to TerminatorInst
to allow us to iterate directly over successors given an instruction.

For example, we can now do

  for (auto *Succ : BI->successors())

instead of

  for (unsigned i = 0, e = BI->getNumSuccessors(); i != e; ++i)

Reviewed by Tobias Grosser.

llvm-svn: 244074

9 years agoStatic Android build doesn't need shared libs.
Chaoren Lin [Wed, 5 Aug 2015 17:42:46 +0000 (17:42 +0000)]
Static Android build doesn't need shared libs.

llvm-svn: 244073

9 years agoAllow sysroot and python to be specified for Android build.
Chaoren Lin [Wed, 5 Aug 2015 17:42:44 +0000 (17:42 +0000)]
Allow sysroot and python to be specified for Android build.

llvm-svn: 244072

9 years agoMIR Serialization: Serialize the 'debug-use' register operand flag.
Alex Lorenz [Wed, 5 Aug 2015 17:41:17 +0000 (17:41 +0000)]
MIR Serialization: Serialize the 'debug-use' register operand flag.

llvm-svn: 244071

9 years ago[CMake] First pass at adding support for clang bootstrap builds to CMake
Chris Bieneman [Wed, 5 Aug 2015 17:38:12 +0000 (17:38 +0000)]
[CMake] First pass at adding support for clang bootstrap builds to CMake

Summary:
This patch adds a new CLANG_ENABLE_BOOTSTRAP option to CMake which adds targets for building a stage2 bootstrap compiler. The targets are:

bootstrap-configure
bootstrap-build
bootstrap (same as bootstrap-configure and bootstrap-build)
bootstrap-install
bootstrap-check-llvm
bootstrap-check-clang
bootstrap-check-all

If you are using 3.3.20150708 or greater it utilizes the ninja USES_TERMINAL_* settings on the external project so that the output is properly buffered.

Reviewers: bogner, chandlerc

Subscribers: filcab, cfe-commits

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

llvm-svn: 244070

9 years agoFlush stderr on dosep status update for Windows.
Chaoren Lin [Wed, 5 Aug 2015 17:36:54 +0000 (17:36 +0000)]
Flush stderr on dosep status update for Windows.

llvm-svn: 244069

9 years agoMIR Parser: Simplify the handling of quoted tokens. NFC.
Alex Lorenz [Wed, 5 Aug 2015 17:35:55 +0000 (17:35 +0000)]
MIR Parser: Simplify the handling of quoted tokens. NFC.

The machine instructions lexer should not expose the difference between quoted
and unquoted tokens to the parser.

llvm-svn: 244068

9 years ago[AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 17:35:34 +0000 (17:35 +0000)]
[AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.

llvm-svn: 244067

9 years ago[test/Index] Update libclang tests to use libclang for creating PCH files.
Argyrios Kyrtzidis [Wed, 5 Aug 2015 17:23:59 +0000 (17:23 +0000)]
[test/Index] Update libclang tests to use libclang for creating PCH files.

This is consistent and tests the primary configuration we want to test, libclang
creating and consuming PCH files.

llvm-svn: 244066

9 years agoFix a tiny bug in -no-canonical-prefixes that somehow we have never
Chandler Carruth [Wed, 5 Aug 2015 17:07:33 +0000 (17:07 +0000)]
Fix a tiny bug in -no-canonical-prefixes that somehow we have never
noticed until now.

The code for setting up the driver's InstalledDir didn't respect
-no-canonical-prefixes. Because of this, there are a few places in the
driver where we would unexpectedly form absolute paths, notably when
searching for and finding GCC installations to use, etc. The fix is
straightforward, and I've added this path to '-v' both so we can test it
sanely and so that it will be substantially more obvious the next time
someone has to debug something here.

Note that there is another bug that we don't actually *canonicalize* the
installed directory! I don't really want to fix that because I don't
have a realistic way to test the usage of this mode. I suspect that
folks using the shared module cache would care about getting this right
though, and so they might want to address it. I've left the appropriate
FIXMEs so that it is clear what to change, and I've updated the test
code to make it clear what is happening here.

llvm-svn: 244065

9 years ago[Sparc] Fix disassembly of popc instruction.
James Y Knight [Wed, 5 Aug 2015 17:00:30 +0000 (17:00 +0000)]
[Sparc] Fix disassembly of popc instruction.

And add tests.

Patch by David Wiberg!

llvm-svn: 244064

9 years agoAdd missing atomic libcall support.
James Y Knight [Wed, 5 Aug 2015 16:57:36 +0000 (16:57 +0000)]
Add missing atomic libcall support.

Support for emitting libcalls for __atomic_fetch_nand and
__atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and some
test cases.

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

llvm-svn: 244063

9 years agoAMDGPU/SI: Remove EXECReg
Matt Arsenault [Wed, 5 Aug 2015 16:42:57 +0000 (16:42 +0000)]
AMDGPU/SI: Remove EXECReg

For the same reasons as the other physical registers.

llvm-svn: 244062

9 years agoAMDGPU: Remove SCCReg.
Matt Arsenault [Wed, 5 Aug 2015 16:42:54 +0000 (16:42 +0000)]
AMDGPU: Remove SCCReg.

These should be handled as a physical register rather
than a virtual register class with one member.

llvm-svn: 244061

9 years ago[AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 16:12:10 +0000 (16:12 +0000)]
[AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

llvm-svn: 244060

9 years agoForce the MachO generated for Darwin to have VERSION_MIN load command
Steven Wu [Wed, 5 Aug 2015 15:36:38 +0000 (15:36 +0000)]
Force the MachO generated for Darwin to have VERSION_MIN load command

On Darwin, it is required to stamp the object file with VERSION_MIN load
command. This commit will provide a VERSRION_MIN load command to the
MachO file that doesn't specify the version itself by inferring from
Target Triple.

llvm-svn: 244059

9 years agotest-release.sh: Fix naming of OpenMP runtime tarball
Hans Wennborg [Wed, 5 Aug 2015 15:36:07 +0000 (15:36 +0000)]
test-release.sh: Fix naming of OpenMP runtime tarball

llvm-svn: 244058

9 years ago[AArch64] Make the naming of the Address Type Promotion pass consistent.
Chad Rosier [Wed, 5 Aug 2015 15:32:23 +0000 (15:32 +0000)]
[AArch64] Make the naming of the Address Type Promotion pass consistent.

llvm-svn: 244057

9 years ago[AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 15:18:58 +0000 (15:18 +0000)]
[AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

IIRC, this pass is off by default, but it's still helpful when debugging.

llvm-svn: 244056

9 years ago[tsan] Enable tsan for aarch64
Adhemerval Zanella [Wed, 5 Aug 2015 15:17:59 +0000 (15:17 +0000)]
[tsan] Enable tsan for aarch64

This patch enabled TSAN for aarch64 with 39-bit VMA layout.  As defined by
tsan_platform.h the layout used is:

0000 4000 00 - 0200 0000 00: main binary
2000 0000 00 - 4000 0000 00: shadow memory
4000 0000 00 - 5000 0000 00: metainfo
5000 0000 00 - 6000 0000 00: -
6000 0000 00 - 6200 0000 00: traces
6200 0000 00 - 7d00 0000 00: -
7d00 0000 00 - 7e00 0000 00: heap
7e00 0000 00 - 7fff ffff ff: modules and main thread stack

Which gives it about 8GB for main binary, 4GB for heap and 8GB for
modules and main thread stack.

Most of tests are passing, with the exception of:

 * ignore_lib0, ignore_lib1, ignore_lib3 due a kernel limitation for
   no support to make mmap page non-executable.

 * longjmp tests due missing specialized assembly routines.

These tests are xfail for now.

The only tsan issue still showing is:

  rtl/TsanRtlTest/Posix.ThreadLocalAccesses

Which still required further investigation.  The test is disable for
aarch64 for now.

llvm-svn: 244055

9 years ago[asan] Enable asan for aarch64
Adhemerval Zanella [Wed, 5 Aug 2015 15:13:33 +0000 (15:13 +0000)]
[asan] Enable asan for aarch64

This patch enables asan for aarch64/linux.  It marks it as 'unstable-release',
since some tests are failing due either kernel missing support of non-executable
pages in mmap or environment instability (infinite loop in juno reference
boards).

It sets decorate_proc_maps test to require stable-release, since the test expects
the shadow memory to not be executable and the support for aarch64 is only
added recently by Linux (da141706aea52c1a9 - 4.0).

It also XFAIL static_tls test for aarch64 linker may omit the __tls_get_addr call
as a TLS optimization.

llvm-svn: 244054

9 years agorevert r243687: enable fast-math-flag propagation to DAG nodes
Sanjay Patel [Wed, 5 Aug 2015 15:12:03 +0000 (15:12 +0000)]
revert r243687: enable fast-math-flag propagation to DAG nodes

We can't propagate FMF partially without breaking DAG-level CSE. We either need to
relax CSE to account for mismatched FMF as a temporary work-around or fully propagate
FMF throughout the DAG.

Surprisingly, there are no existing regression tests for this, but here's an example:

  define float @fmf(float %a, float %b) {
    %mul1 = fmul fast float %a, %b
    %nega = fsub fast float 0.0, %a
    %mul2 = fmul fast float %nega, %b
    %abx2 = fsub fast float %mul1, %mul2
    ret float %abx2
  }

$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=0
...
    vmulss    %xmm1, %xmm0, %xmm0
    vaddss    %xmm0, %xmm0, %xmm0
    retq

$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1
...
    vmulss    %xmm1, %xmm0, %xmm2
    vfmadd213ss    %xmm2, %xmm1, %xmm0  <--- failed to recognize that (a * b) was already calculated
    retq

llvm-svn: 244053

9 years ago[SHAVE] uppercase the CHECK prefixes in 'lit' tests. NFC
Douglas Katzman [Wed, 5 Aug 2015 15:08:54 +0000 (15:08 +0000)]
[SHAVE] uppercase the CHECK prefixes in 'lit' tests. NFC

llvm-svn: 244052

9 years agoDelete trailing whitespace
Douglas Katzman [Wed, 5 Aug 2015 15:08:53 +0000 (15:08 +0000)]
Delete trailing whitespace

llvm-svn: 244051

9 years agoAdd bare minimum to get a working i386 linux program.
Rafael Espindola [Wed, 5 Aug 2015 15:08:40 +0000 (15:08 +0000)]
Add bare minimum to get a working i386 linux program.

llvm-svn: 244050

9 years agoOfficially end my reign as owner of the driver.
Chad Rosier [Wed, 5 Aug 2015 14:52:01 +0000 (14:52 +0000)]
Officially end my reign as owner of the driver.

llvm-svn: 244049

9 years agoMake this less error prone by using a #define. NFC.
Chad Rosier [Wed, 5 Aug 2015 14:48:44 +0000 (14:48 +0000)]
Make this less error prone by using a #define. NFC.

llvm-svn: 244048

9 years agoUpdate some links so that they don't point at the (private) WG21 Wiki
Marshall Clow [Wed, 5 Aug 2015 14:36:42 +0000 (14:36 +0000)]
Update some links so that they don't point at the (private) WG21 Wiki

llvm-svn: 244047

9 years ago[AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.
Chad Rosier [Wed, 5 Aug 2015 14:22:53 +0000 (14:22 +0000)]
[AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.

Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

llvm-svn: 244046

9 years ago[AA] Use CallSite cast idiom. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 14:16:44 +0000 (14:16 +0000)]
[AA] Use CallSite cast idiom. No functionality change.

llvm-svn: 244045

9 years ago[YAMLTraits] Use StringRef::copy. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 14:16:38 +0000 (14:16 +0000)]
[YAMLTraits] Use StringRef::copy. No functionality change.

llvm-svn: 244044

9 years ago[IR] Simplify code with ArrayRef::copy. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 14:16:28 +0000 (14:16 +0000)]
[IR] Simplify code with ArrayRef::copy. No functionality change.

llvm-svn: 244043