Commit Graph

186005 Commits

Author SHA1 Message Date
Andrea Di Biagio f5b34e535d [X86] Add 'FeatureSlowSHLD' to cpu 'bdver3'. Also explicit set FeatureAVX and FeatureSSE4A for all the bdver* cpus.
This patch adds 'FeatureSlowSHLD' to 'bdver3'.
According to the official AMD optimization guide for amdfam15: "Using
alternative code in place of SHLD achieves lower overall latency and
requires fewer execution resources. The 32-bit and 64-bit forms of
ADD, ADC, SHR, and LEA (except 16-bit form) are DirectPath
instructions, while SHLD is a VectorPath instruction."

This patch also explicitly sets feature AVX and SSE4A for all the bdver*
cpus. This part of the patch is a non-functional change and it is mainly
done for clarity reasons (Both XOP and FMA4 already imply AVX and SSE4A).

llvm-svn: 221296
2014-11-04 21:18:09 +00:00
Justin Bogner af20fae2fb ErrorOr: Be more explicit in the implicit conversion to bool docs
llvm-svn: 221295
2014-11-04 21:01:48 +00:00
Alexey Samsonov e3754634c0 [TSan] Make ReportStack contain __sanitizer::AddressInfo object.
AddressInfo contains the results of symbolization. Store this object
directly in the symbolized stack, instead of copying data around and
making unnecessary memory allocations.

No functionality change.

llvm-svn: 221294
2014-11-04 20:52:37 +00:00
Arnaud A. de Grandmaison a11cab3120 [PBQP] Callee saved regs should have a higher cost than scratch regs
Registers are not all equal. Some are not allocatable (infinite cost),
some have to be preserved but can be used, and some others are just free
to use.

Ensure there is a cost hierarchy reflecting this fact, so that the
allocator will favor scratch registers over callee-saved registers.

llvm-svn: 221293
2014-11-04 20:51:29 +00:00
Arnaud A. de Grandmaison 829dd81377 [PBQP] Tweak spill costs and coalescing benefits
This patch improves how the different costs (register, interference, spill
and coalescing) relates together. The assumption is now that:
 - coalescing (or any other "side effect" of reg alloc) is negative, and
   instead of being derived from a spill cost, they use the block
   frequency info.
 - spill costs are in the [MinSpillCost:+inf( range
 - register or interference costs are in [0.0:MinSpillCost( or +inf

The current MinSpillCost is set to 10.0, which is a random value high
enough that the current constraint builders do not need to worry about
when settings costs. It would however be worth adding a normalization
step for register and interference costs as the last step in the
constraint builder chain to ensure they are not greater than SpillMinCost
(unless this has some sense for some architectures). This would work well
with the current builder pipeline, where all costs are tweaked relatively
to each others, but could grow above MinSpillCost if the pipeline is
deep enough.

The current heuristic is tuned to depend rather on the number of uses of
a live interval rather than a density of uses, as used by the greedy
allocator. This heuristic provides a few percent improvement on a number
of benchmarks (eembc, spec, ...) and will definitely need to change once
spill placement is implemented: the current spill placement is really
ineficient, so making the cost proportionnal to the number of use is a
clear win.

llvm-svn: 221292
2014-11-04 20:51:24 +00:00
Matt Arsenault a95f5a0ec1 R600/SI: Rename div_scale dest operands to match documentation
llvm-svn: 221291
2014-11-04 20:29:20 +00:00
Benjamin Kramer 7111b91ee7 Make helper function static. NFC.
llvm-svn: 221290
2014-11-04 20:26:01 +00:00
Benjamin Kramer 185dc0da1f AArch64: Pattern match integer vector abs like we do on ARM.
This kind of pattern is emitted by the loop vectorizer.

llvm-svn: 221289
2014-11-04 20:10:06 +00:00
Kostya Serebryany c5bd9810cc [asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar Sukhani
llvm-svn: 221288
2014-11-04 19:46:15 +00:00
Alexey Samsonov 26ca05ad96 [Sanitizer] Get rid of unnecessary allocations in StripModuleName. NFC.
llvm-svn: 221287
2014-11-04 19:34:29 +00:00
Enrico Granata 404ab37e8b Fix the build for LLVM changes
llvm-svn: 221286
2014-11-04 19:33:45 +00:00
Roman Divacky 5cd8df6d1d Since the file has both ppc and ppc64 tests in it rename it.
llvm-svn: 221285
2014-11-04 18:49:15 +00:00
Roman Divacky c294022900 Rewrite the test to not require asserts.
llvm-svn: 221284
2014-11-04 18:48:20 +00:00
Alexey Samsonov 3931dca7ec [TSan] Keep original function and filename in ReportStack.
TSan used to do the following transformations with data obtained
from the symbolizer:
1) Strip "__interceptor_" prefix from function name.
2) Use "strip_path_prefix" runtime flag to strip filepath.

Now these transformations are performed right before the stack trace
is printed, and ReportStack structure contains original information.

This seems like a right thing to do - stripping is a detail of report
formatting implementation, and should belong there. We should, for
example, use original path to source file when we apply suppressions.

This change also make "strip_path_prefix" flag behavior in TSan
consistent with all the other sanitizers - now it should actually
match *the prefix* of path, not some substring. E.g. earlier TSan
would turn "/usr/lib/libfoo.so" into "libfoo.so" even if strip_path_prefix
was "/lib/".

Finally, strings obtained from symbolizer come from internal allocator,
and "stripping" them early by incrementing a "char*" ensures they can
never be properly deallocated, which is a bug.

llvm-svn: 221283
2014-11-04 18:41:38 +00:00
Rafael Espindola 649f172c17 Remove unused DisableRedZone option.
Patch by Steve King.

llvm-svn: 221282
2014-11-04 18:18:52 +00:00
David Majnemer 2de97fcd9a InstSimplify: Fold a hasNoSignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise.

llvm-svn: 221281
2014-11-04 17:47:13 +00:00
David Majnemer 4f438377fb InstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise.

llvm-svn: 221280
2014-11-04 17:38:50 +00:00
Kuba Brecka 9ff912db22 Use @rpath as LC_ID_DYLIB for ASan dylib on OS X
Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library.

Reviewed at http://reviews.llvm.org/D6018

llvm-svn: 221279
2014-11-04 17:35:17 +00:00
Kuba Brecka 6c22aec23c Use @rpath as LC_ID_DYLIB for ASan dylib on OS X
Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library.

Reviewed at http://reviews.llvm.org/D6018

llvm-svn: 221278
2014-11-04 17:34:50 +00:00
Toma Tabacu cc2502d8f3 [mips] Improve support for the .set mips16/nomips16 assembler directives.
Summary:
Appropriately set/clear the FeatureBit for Mips16 when these assembler directives are used and also emit ".set nomips16" (previously, only ".set mips16" was being emitted).

These improvements allow for better testing of the .cpload/.cprestore assembler directives (which are not supposed to work when Mips16 is enabled).

Test Plan: The test is bare-bones because there are no MC tests for Mips16 instructions (there's only one, which checks that the Mips16 ELF header flag gets set), and that suggests to me that it has not been implemented yet in the IAS.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 221277
2014-11-04 17:18:07 +00:00
Juergen Ributzka 7d434ce7e5 [Stackmaps] Make test less fragile. NFC.
llvm-svn: 221276
2014-11-04 17:11:00 +00:00
Eric Fiselier 193bd50fe4 Mark another test as UNSUPPORTED with ASAN and MSAN
llvm-svn: 221275
2014-11-04 17:03:47 +00:00
Sanjay Patel aee8421088 remove function names from comments; NFC
llvm-svn: 221274
2014-11-04 16:27:42 +00:00
Sanjay Patel 547e9752ff fix typo in comment
llvm-svn: 221273
2014-11-04 16:09:50 +00:00
Alexander Kornienko ddf9767a49 [clang-tidy] Don't print a message if there's no error.
llvm-svn: 221272
2014-11-04 15:25:22 +00:00
Yaron Keren 3c4c9fed08 Re-enable this test on Windows since it passes with GnuWin32 env.exe.
llvm-svn: 221271
2014-11-04 14:54:37 +00:00
NAKAMURA Takumi 14e3fc6ad4 Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating.
llvm-svn: 221270
2014-11-04 14:41:53 +00:00
NAKAMURA Takumi 06ac98299f Remove "REQUIRES:shell" from tests. They work for me.
llvm-svn: 221269
2014-11-04 13:41:33 +00:00
Simon Atanasyan d2bfd00e71 [yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
llvm-svn: 221268
2014-11-04 13:33:36 +00:00
NAKAMURA Takumi 69e32f4562 clang/test/Tooling: Remove mention to PR15590 out of a couple of tests. They are suppressed with another issue.
llvm-svn: 221267
2014-11-04 13:32:29 +00:00
NAKAMURA Takumi 83910ae5b6 clang/test/Tooling: [PR15590] Avoid backslashes in JSON. Should work on win32.
llvm-svn: 221266
2014-11-04 13:32:17 +00:00
NAKAMURA Takumi f4de174a44 Re-enable tests in llvm/test/Object, corresponding to line_iterator's
change in r221153.

llvm-svn: 221265
2014-11-04 13:19:29 +00:00
NAKAMURA Takumi cf15c170d5 clang/test/VFS/umbrella-mismatch.m: Let it work on win32 to avoid backslashes in yaml.
FIXME: Is it intentional? s;OUT_DIR;%/S/Inputs;
llvm-svn: 221264
2014-11-04 13:05:23 +00:00
NAKAMURA Takumi bf37ee795c clang/test/Coverage/html-diagnostics.c: Use find(1) to avoid globbing.
llvm-svn: 221263
2014-11-04 13:05:10 +00:00
NAKAMURA Takumi 217ee5bf92 llvm/test/Transforms/GCOVProfiling/linezero.ll: Use %/T instead of %T in regex. This works on win32.
llvm-svn: 221262
2014-11-04 13:00:48 +00:00
NAKAMURA Takumi ed7e1cbc4c clang/test/Modules: Remove "REQUIRES:shell" since they work for me.
llvm-svn: 221261
2014-11-04 12:59:18 +00:00
Rafael Espindola ecc2ebe846 Use findProgramByName. NFC.
llvm-svn: 221260
2014-11-04 12:48:22 +00:00
Daniel Jasper d0ec0d62d6 clang-format: Use identifier table for keywords in other languages.
Slightly easier to write, more efficient and prevents bugs by
misspelling them.

No functional changes intended.

llvm-svn: 221259
2014-11-04 12:41:02 +00:00
Rafael Espindola c1f30877e0 Remove FindProgramByName. NFC.
llvm-svn: 221258
2014-11-04 12:35:47 +00:00
Rafael Espindola 5a899e332b Use llvm::sys::findProgramByName. NFC.
llvm-svn: 221257
2014-11-04 12:34:32 +00:00
Daniel Jasper 58fcf6df65 clang-format: [Java] Fix class declaration line breaks.
Before:
  @SomeAnnotation()
  abstract
      class aaaaaaaaa<a> extends bbbbbbbbbbbb<b> implements cccccccccccc {
  }

After:
  @SomeAnnotation()
  abstract class aaaaaaaaa<a> extends bbbbbbbbbbbb<b>
      implements cccccccccccc {
  }

llvm-svn: 221256
2014-11-04 10:53:14 +00:00
Daniel Jasper 20bc4b0f5c clang-format: Fix vim integration if g:clang_format_binary doesn't exist
llvm-svn: 221254
2014-11-04 10:40:26 +00:00
Yaron Keren ec69a4ece1 Fix Visual C++ warning, Program.inc(85): warning C4018: '<' : signed/unsigned mismatch.
llvm-svn: 221252
2014-11-04 09:22:41 +00:00
Tobias Grosser 477a1dce2b Use argument type directly from fflush if available in translation unit
When our RuntimeDebugBuilder calles fflush(NULL) to flush all output streams, it
is important that the types we use in the call match the ones used in a
declaration of fflush possible already available in the translation unit.

As we just pass on a NULL pointer, the type of the pointer value does not really
matter. However, as LLVM complains in case of mismatched types, we make sure
to create a NULL pointer of identical type.

No test case, as RuntimeDebugBuilder is not permanently used in Polly. Calls to
it are until now only used to add informative output during debugging sessions.

llvm-svn: 221251
2014-11-04 09:18:24 +00:00
Charlie Turner 34ec84ec7f Add missing tests for build attribute encodings in object files.
test/MC/ARM/directive-eabi_attribute.s was missing several tests of object file
encodings relative to the existing tests for assembly file encodings. This
commit adds the missing tests.

Change-Id: Ie110ca02b65e8f4d4c77f437bd09d03607fa5c0d
llvm-svn: 221250
2014-11-04 09:07:40 +00:00
David Majnemer 7b2e22cec4 Driver: Pass some std::strings by reference instead of value
No functional change intended. This fixes PR21463.

llvm-svn: 221249
2014-11-04 08:55:13 +00:00
Alexander Kornienko 616860994d [clang-tidy] Move -extra-arg handling to CommonOptionsProvider
Summary:
Handle -extra-arg and -extra-arg-before options in the
CommonOptionsProvider so they can be used in all clang tools. Adjust arguments
in a CompilationDatabase wrapper instead of adding ArgumentsAdjuster to the
tool.

Reviewers: djasper, klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 221248
2014-11-04 08:51:24 +00:00
David Majnemer ea9b8ee43d llvm-objdump: Pass DiceTableEntry by reference
DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.

This fixes PR21464.

llvm-svn: 221247
2014-11-04 08:41:48 +00:00
NAKAMURA Takumi 72e626e305 sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests.
It seems SearchPath() doesn't show actual extension on the filesystem.

FIXME: Shall we use FindFirstFile() here?
llvm-svn: 221246
2014-11-04 08:17:15 +00:00
David Majnemer b925715c56 CodeGen: Enable DWARF emission for MS ABI targets
This is experimental, just barely enough to get things to not
immediately combust.

A note for those who are curious:
Only lld can successfully link the object files, other linkers truncate
the section names making the debug sections illegible to debuggers.

Even with this in mind, we believe we are having trouble with SECREL
relocations.

llvm-svn: 221245
2014-11-04 08:03:31 +00:00