Commit Graph

216330 Commits

Author SHA1 Message Date
Sumanth Gundapaneni c61c08e618 Make tbm-builtins.c as X86 specific unit test
Differential Revision: http://reviews.llvm.org/D14887

llvm-svn: 253887
2015-11-23 17:33:49 +00:00
Xinliang David Li 4dff875259 Disable frame pointer elimination when using -pg
(Re-apply patch after bug fixing)

This diff makes sure that the driver does not pass
-fomit-frame-pointer or -momit-leaf-frame-pointer to
the frontend when -pg is used. Currently, clang gives 
an error if -fomit-frame-pointer is used in combination 
with -pg, but -momit-leaf-frame-pointer was forgotten.
Also, disable frame pointer elimination in the frontend 
when -pg is set.

Patch by Stefan Kempf.

llvm-svn: 253886
2015-11-23 17:30:31 +00:00
Xinliang David Li e95d7fac58 [PGO] Use common definition of raw magic and version
- Replace duplicate definition and use of magic in profile runtime
- Replace hard coded version reference in profile runtime

llvm-svn: 253885
2015-11-23 17:26:53 +00:00
Igor Kudrin ee252ded15 [ELF/AArch64] Factor out overflow checks into a separate function. NFC.
Differential revision: http://reviews.llvm.org/D14922

llvm-svn: 253884
2015-11-23 17:16:09 +00:00
Xinliang David Li 0ca5bd4a46 [PGO] Start use InstrProf template file in compiler-rt/lib/profile
- Replace use of __llvm_profile_value_data with common data structure.
- Remve duplicate InstrProfValueNode

llvm-svn: 253883
2015-11-23 17:09:40 +00:00
Aaron Ballman 6290fc9154 Add an AST matcher for narrowing when a type is volatile-qualified.
llvm-svn: 253882
2015-11-23 17:09:24 +00:00
Xinliang David Li 19c1922c04 Sync up InstrProfData.inc with master
llvm-svn: 253881
2015-11-23 17:06:44 +00:00
Xinliang David Li f3faad95af Fix comment not allowed in C90
llvm-svn: 253880
2015-11-23 17:05:45 +00:00
Igor Kudrin bf08749b29 [ELF/AArch64] Fix overflow checks for R_AARCH64_PREL16 and _PREL32 relocations.
llvm-svn: 253879
2015-11-23 16:56:10 +00:00
Dan Gohman 53828fd777 [WebAssembly] Emit .param, .result, and .local through MC.
This eliminates one of the main remaining uses of EmitRawText.

llvm-svn: 253878
2015-11-23 16:50:18 +00:00
Diego Novillo 1ca881c4bb SamplePGO - Clear coverage tracking when clearing per-function data.
llvm-svn: 253877
2015-11-23 16:30:17 +00:00
Dan Gohman 3280793234 [WebAssembly] Use dominator information to improve BLOCK placement
Always starting blocks at the top of their containing loops works, but creates
unnecessarily deep nesting because it makes all blocks in a loop overlap.
Refine the BLOCK placement algorithm to start blocks at nearest common
dominating points instead, which significantly shrinks them and reduces
overlapping.

llvm-svn: 253876
2015-11-23 16:19:56 +00:00
Daniel Sanders 2b561336d9 [mips] .ent and .end should also set the type and size of the symbol respectively.
Reviewers: vkalintiris

Subscribers: llvm-commits, seanbruno, emaste, vkalintiris, dsanders

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

llvm-svn: 253875
2015-11-23 16:08:03 +00:00
Martell Malone ba0f7d2b9d Revert part of r253813
The new lld gnu frontend does not support the -target option

llvm-svn: 253874
2015-11-23 16:04:55 +00:00
Daniel Jasper 569369ce28 clang-format: Signficantly refactor the cast detection.
No functional changes intended.

llvm-svn: 253873
2015-11-23 15:55:55 +00:00
Daniel Jasper 9bb3001d53 clang-format: Fix incorrect cast detection.
Before:
  bool b = f(g<int>)&&c;

After:
  bool b = f(g<int>) && c;

llvm-svn: 253872
2015-11-23 15:55:50 +00:00
Daniel Jasper 253dad2323 clang-format: If the template list of a variable declaration spans
multiple lines, also break before the variable name.

Before:
  std::vector<aaaaaa, // wrap
              aa> aaa;

After:
  std::vector<aaaaaa, // wrap
              aa>
      aaa;

llvm-svn: 253871
2015-11-23 15:55:45 +00:00
Nathan Slingerland 8a0654836e [Support] Fix SaturatingMultiply<T>() to be correct (and fast), Re-enable Unit Tests
Summary:
This change fixes the SaturatingMultiply<T>() function template to not cause undefined behavior with T=uint16_t.
Thanks to Richard Smith's contribution, it also no longer requires an integer division.

Patch by Richard Smith.

Reviewers: silvas, davidxl

Subscribers: rsmith, davidxl, llvm-commits

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

llvm-svn: 253870
2015-11-23 15:33:43 +00:00
Rafael Espindola e02c86812c Fix Elf_Rel processing for .eh_frame.
Thanks to Simon for the bug report.

llvm-svn: 253869
2015-11-23 15:28:28 +00:00
Diego Novillo 39ab68f39b SamplePGO - Use newly introduced local variable. NFC.
llvm-svn: 253868
2015-11-23 15:24:13 +00:00
Krzysztof Parzyszek 29d23f9f4c [Hexagon] Update instruction formats
llvm-svn: 253867
2015-11-23 14:09:26 +00:00
Alexey Bataev 92e82f9cce [OPENMP] 'out' dependency for 'task' directives must be the same as 'inout'.
Runtime library requires, that codegen for 'depend' clause for 'out' dependency kind must be the same as codegen for 'depend' clause with 'inout' dependency.

llvm-svn: 253866
2015-11-23 13:33:42 +00:00
Martell Malone a6b867eb0d ARM: address WoA division overflow crash
Disable custom handling of signed 32-bit and 64-bit integer divide.
Add test cases for both 32-bit and 64-bit integer overflow crashes.

llvm-svn: 253865
2015-11-23 13:11:39 +00:00
Mohit K. Bhakkad 5a998ed7a6 [LLDB][MIPS] Getting 0 index for H/W watchpoint is not necessarily an error
Reviewers: jaydeep.
Subscribers: bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D14860

llvm-svn: 253864
2015-11-23 12:19:59 +00:00
Anastasia Stulova 784fb78274 [OpenCL 2.0] Apply default address space (AS).
If AS of a variable/parameter declaration is not set by the source,
OpenCL v2.0 s6.5 defines explicit rules for default ASes:

- The AS of global and local static variables defaults to global;
- All pointers point to generic AS.

http://reviews.llvm.org/D13168

llvm-svn: 253863
2015-11-23 11:14:44 +00:00
Tobias Grosser 5ef2bc316d Use SmallVector instead of std::vector
This was proposed as post-commit review comment for commit r253818.

Suggested by: Johannes Doerfert <doerfert@cs.uni-saarland.de>

llvm-svn: 253862
2015-11-23 10:18:23 +00:00
Daniel Jasper 7048edb104 Fix clang-format test. I believe that the new behavior is better.
llvm-svn: 253861
2015-11-23 08:50:52 +00:00
Daniel Jasper b68aabf7fc clang-format: Make moving of the Cursor work properly when sorting #includes.
llvm-svn: 253860
2015-11-23 08:36:35 +00:00
Daniel Jasper 3fed94525c Fix calculation of shifted cursor/code positions. Specifically support
the case where a specific range is replaced by new text. Previously,
the calculation would shift any position from within a replaced region
to the first character after the region. This is undersirable, e.g. for
clang-format's include sorting.

llvm-svn: 253859
2015-11-23 08:33:48 +00:00
Kuba Brecka 2f8d345adc [tsan] Modify the tls_race.cc and tls_race2.cc tests to pass on OS X
On OS X, __thread variables are lazily heap-allocated (with malloc). Therefore, they're recognized as heap blocks (which is what they are) and not as TLS variables in TSan reports. Figuring out if a heap block is a TLS or not is difficult (in malloc interceptor we could analyze the caller and then mark the object), so let's instead modify the tests so that we expect the report to say "Location is heap block" instead of "Location is TLS".

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

llvm-svn: 253858
2015-11-23 08:17:17 +00:00
Craig Topper de2d7593a2 [TableGen] Use std::remove_if instead of manually coded loops that called erase inside them. NFC
llvm-svn: 253857
2015-11-23 07:19:10 +00:00
Craig Topper d2177de61a [TableGen] Use empty() instead of checking if size of vector is greater than or equal to 1.
llvm-svn: 253856
2015-11-23 07:19:08 +00:00
Craig Topper 2241dfd2dc [Mips] Remove an unnecessary wrapping of a predicate with std::ptr_fun. NFC
llvm-svn: 253855
2015-11-23 07:19:06 +00:00
NAKAMURA Takumi 805e657584 OpenMPClause.h: Fix typos. [-Wdocumentation]
llvm-svn: 253854
2015-11-23 06:41:50 +00:00
Vedant Kumar 280001807b [Driver] Mark isForDiagnostics as const. NFC.
llvm-svn: 253853
2015-11-23 06:40:49 +00:00
Xinliang David Li e90daa1dac [PGO] Make InstrProfData.inc available to compiler-rt.
This will enable a series of cleanup/refactoring.

llvm-svn: 253852
2015-11-23 05:47:05 +00:00
Xinliang David Li a2124eebbd Revert r253846 (build bot failure))
llvm-svn: 253851
2015-11-23 05:41:05 +00:00
Kelvin Li 7010ed6be3 [OpenMP] Parsing and sema support for map clause - add test case
http://reviews.llvm.org/D14134 

llvm-svn: 253850
2015-11-23 05:36:37 +00:00
Kelvin Li 0bff7afab5 [OpenMP] Parsing and sema support for map clause
http://reviews.llvm.org/D14134 

llvm-svn: 253849
2015-11-23 05:32:03 +00:00
Xinliang David Li 67501ca1b9 Move two Value Profiler data structs to InstrProfData.inc (NFC)
llvm-svn: 253848
2015-11-23 05:29:51 +00:00
Xinliang David Li ab94e71dc6 Fix a bug introduced in cleanup
llvm-svn: 253847
2015-11-23 05:16:28 +00:00
Xinliang David Li eadaf84e78 Disable frame pointer elimination when using -pg
This diff makes sure that the driver does not pass
-fomit-frame-pointer or -momit-leaf-frame-pointer to
the frontend when -pg is used. Currently, clang gives 
an error if -fomit-frame-pointer is used in combination 
with -pg, but -momit-leaf-frame-pointer was forgotten.
Also, disable frame pointer elimination in the frontend 
when -pg is set.

Patch by Stefan Kempf.

llvm-svn: 253846
2015-11-23 05:09:10 +00:00
Xinliang David Li 6fe18f4fba [PGO] Compiler-rt cleanup -- introduces macros for various macros
This makes code more readable and be made more portable in the future.
There is no functional change.

llvm-svn: 253845
2015-11-23 04:38:17 +00:00
Xinliang David Li 970fe56e41 [PGO] Fix remaining bugs in ProfData template file (when used by compiler-rt)
1. move const qualifier out of raw header field type as runtime use of the header
   needs to initialze the fields
2. use C style casting for integer types.

llvm-svn: 253844
2015-11-23 03:49:07 +00:00
David Majnemer 67528eaacf [MS ABI] Tolerate invokes of __RTDynamicCast
The pointer returned by __RTDynamicCast must be bitcasted.  However, it
was not expected that __RTDynamicCast would be invoked, resulting in the
bitcast occuring in a different BasicBlock than the invoke.  This caused
a down-stream PHI to get confused about which BasicBlock the incomming
value was from.

This fixes PR25606.

llvm-svn: 253843
2015-11-23 03:01:14 +00:00
Davide Italiano 6f93df8105 [Analysis/CallGraph] Switch dump() definitions over to LLVM_DUMP_METHOD.
llvm-svn: 253842
2015-11-23 02:58:42 +00:00
Davide Italiano 945d05f6a0 [LoopStrengthReduce] Mark dump() definitions as LLVM_DUMP_METHOD.
llvm-svn: 253841
2015-11-23 02:47:30 +00:00
Mehdi Amini 8220e8a830 Add const qualifier for FunctionInfoIndex in ModuleLinker and linkInModule() (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 253840
2015-11-23 01:59:16 +00:00
Mehdi Amini ededfce1b7 Add const qualifier on FunctionInfoIndex::hasExportedFunctions() (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 253839
2015-11-23 01:59:12 +00:00
Craig Topper 2f70a7ef57 Revert a portion of r253836 that seems to have broke a couple bots.
llvm-svn: 253838
2015-11-22 22:43:40 +00:00