Commit Graph

150640 Commits

Author SHA1 Message Date
Enrico Granata 8e698323ec A few cleanups for our documentation
llvm-svn: 183058
2013-05-31 22:54:23 +00:00
Eric Christopher 65ac02ad78 Const-ify some printing and dumping code for DIEValues.
llvm-svn: 183057
2013-05-31 22:50:40 +00:00
Richard Trieu 9d22880c24 Fix the indentation on the AST visitors used in -Wloop-analysis.
llvm-svn: 183056
2013-05-31 22:46:45 +00:00
Anna Zaks 737926ba6c [analyzer] Fix a false positive reported on rare strange code, which happens to be in JSONKit
llvm-svn: 183055
2013-05-31 22:39:13 +00:00
Eric Christopher 1ec87e8bb0 Add support for adding the contents of a StringRef to the MD5 hash.
llvm-svn: 183054
2013-05-31 22:34:56 +00:00
Eric Christopher 85bd745e77 Convert more unsigned char -> uint8_t.
llvm-svn: 183053
2013-05-31 22:34:52 +00:00
Eric Christopher d0910436e7 Fix comment.
llvm-svn: 183052
2013-05-31 22:34:48 +00:00
Eric Christopher 606ecda4a1 Move "unsigned char" -> "uint8_t".
llvm-svn: 183051
2013-05-31 22:34:34 +00:00
Rui Ueyama feaa72a4b0 Fix typo in comment.
llvm-svn: 183050
2013-05-31 22:08:30 +00:00
Matt Kopec 085d6cec1a Add ability to attach/detach to multi-threaded inferiors on Linux.
All running threads will be detected and stopped on attach and all threads get resumed on detach.

llvm-svn: 183049
2013-05-31 22:00:07 +00:00
Fariborz Jahanian deac9ac546 Objective-C: Fixes an ivar lookup bug where
'ivar' was used inside a record/union used 
as argument to __typeof. // rdar14037151 pr5984

llvm-svn: 183048
2013-05-31 21:51:12 +00:00
Arnold Schwaighofer 7b1b4db35e LoopVectorize: Change API call to get the backedge taken count
Use ScalarEvolution's getBackedgeTakenCount API instead of getExitCount since
that is really what we want to know. Using the more specific getExitCount was
safe because we made sure that there is only one exiting block.

No functionality change.

llvm-svn: 183047
2013-05-31 21:48:56 +00:00
David Majnemer 36bc703e03 Put the PR16167 tests together
llvm-svn: 183046
2013-05-31 21:29:50 +00:00
Quentin Colombet bf490d4a32 Loop Strength Reduce: Scaling factor cost.
Account for the cost of scaling factor in Loop Strength Reduce when rating the
formulae. This uses a target hook.

The default implementation of the hook is: if the addressing mode is legal, the
scaling factor is free.

<rdar://problem/13806271>

llvm-svn: 183045
2013-05-31 21:29:03 +00:00
Daniel Malea fac51ab5e2 Skipping test case for clang 3.4 due to llvm.org/pr16191
- should resolve remaining buildbot issues with debian/clang builder

llvm-svn: 183044
2013-05-31 21:05:23 +00:00
Rafael Espindola 3383b59c39 Use just a ArrayRef<uint8_t> to store both hex string and binary data.
llvm-svn: 183043
2013-05-31 21:03:51 +00:00
Rafael Espindola 3f1c99a67c Rename COFFYaml.h to COFFYAML.h for consistency.
llvm-svn: 183042
2013-05-31 20:38:27 +00:00
Rafael Espindola 44687096ee Remove union to fix build in c++03.
llvm-svn: 183041
2013-05-31 20:35:58 +00:00
Rafael Espindola a3310e0b9e Don't allocate temporary string for section data.
llvm-svn: 183040
2013-05-31 20:26:44 +00:00
Daniel Malea c91e4ab26e Use C-style include to match style in file (instead of C++ style)
- as per review comment from Dimitry Andric!

llvm-svn: 183039
2013-05-31 20:21:38 +00:00
Daniel Malea 132c4a266c CMake FreeBSD fix: add missing Process plugin directory
Patch by Ed Maste!

llvm-svn: 183038
2013-05-31 20:16:40 +00:00
Han Ming Ong 79371ceedf <rdar://problem/13752848>
Add 'JoinExistingSession' to XPC for root debugging.

llvm-svn: 183037
2013-05-31 20:15:19 +00:00
Ed Schouten 9f57805e48 Fix style bug introduced in r183033.
I renamed the function at one point in time, but forgot to fix the
layout of the arguments.

llvm-svn: 183036
2013-05-31 20:12:49 +00:00
Arnold Schwaighofer 70a9be5297 LoopVectorize: PHIs with only outside users should prevent vectorization
We check that instructions in the loop don't have outside users (except if
they are reduction values). Unfortunately, we skipped this check for
if-convertable PHIs.

Fixes PR16184.

llvm-svn: 183035
2013-05-31 19:53:50 +00:00
Rui Ueyama 739730e299 [WinLink][Driver] Add -entry command line option.
llvm-svn: 183034
2013-05-31 19:34:29 +00:00
Ed Schouten c7e82bd4e3 Add support for optimized (non-generic) atomic libcalls.
For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
provide atomic functions that pass parameters by value and return
results directly.

libgcc and libcompiler-rt only provide optimized libcalls for
__atomic_fetch_*, as generic libcalls on non-integer types would make
little sense. This means that we can finally make __atomic_fetch_* work
on architectures for which we don't provide these operations as builtins
(e.g. ARM).

This should fix the dreaded "cannot compile this atomic library call
yet" error that would pop up once every while.

llvm-svn: 183033
2013-05-31 19:27:59 +00:00
Daniel Malea e376a65182 FreeBSD cmake build fixes.
- missing #include <cstdlib> in Mangled.cpp
- missing include dirs in FreeBSD CMakeLists.txt

Patch by Ed Maste!

llvm-svn: 183032
2013-05-31 19:24:53 +00:00
Benjamin Kramer fae7ff12d2 NVPTX: Don't even create a regalloc if we're not going to use it.
Fixes a leak found by valgrind.

llvm-svn: 183031
2013-05-31 19:21:58 +00:00
Enrico Granata b294fd2037 <rdar://problem/14035604>
Fixing an issue where formats would not propagate from parents to children in all cases
Details follow:
an SBValue has children and those are fetched along with their values
Now, one calls SBValue::SetFormat() on the parent
Technically, the format choices should propagate onto the children (see ValueObject::GetFormat())
But if the children values are already fetched, they won't notice the format change and won't update themselves
This commit fixes that by making ValueObject::GetValueAsCString() check if any format change intervened from the previous call to the current one
A test case is also added

llvm-svn: 183030
2013-05-31 19:18:19 +00:00
Ed Schouten 8c23472265 Slightly extend matching for atomic loads.
Also add the "=" to the matched pattern, to see whether we actually save
the loaded value.

llvm-svn: 183029
2013-05-31 19:18:14 +00:00
Michael Gottesman fc718c9572 [APFloat] Added a unittest for APFloat::getZero.
llvm-svn: 183028
2013-05-31 18:43:34 +00:00
Tobias Grosser 26d1050da3 Update isl to include isl_val changes
The latest version of isl includes a new data type isl_val, which properly hides
the multi precision math library used by isl. In Polly we would like to replace
all uses of isl_int with the corresponding isl_val interfaces. This will allow
us to switch the multi precision math library in isl. This is especially
interesting for people who would like to replace libgmp with a non-gpl licensed
library (e.g. imath).

llvm-svn: 183026
2013-05-31 18:04:56 +00:00
Tobias Grosser 93324aef17 Test that independent block pass does not transform induction variables
The original test case showed a problem with the independet blocks pass and
we decided to XFAIL it for now. Unfortunately the failure is not detected if
we build without asserts and the verification of the independent block pass
is not run. This change tests now for the actual reason of the failure and
should trigger even in a non asserts build. We did not yet solve the underlying
bug, but this should at least make the test suite behavior consistent.

llvm-svn: 183025
2013-05-31 17:44:38 +00:00
Enrico Granata 39d5141085 Small code cleanups
llvm-svn: 183024
2013-05-31 17:43:40 +00:00
Sebastian Pop 14f802f99c include missing ISL header file
to be able to compile with ISL master as of today
1df91d8515ec88dc7f7f597168ad0f34f26de5a7

llvm-svn: 183023
2013-05-31 17:41:17 +00:00
Sean Callanan 7d01ddd6f8 Fixed value evaluation to handle null constants.
<rdar://problem/14005311>

llvm-svn: 183022
2013-05-31 17:29:03 +00:00
Quentin Colombet 8aa7abe2ae Modify how the formulae are rated in Loop Strength Reduce.
Namely, check if the target allows to fold more that one register in the
addressing mode and if yes, adjust the cost accordingly.

Prior to this commit, reg1 + scale * reg2 accesses were artificially preferred
to reg1 + reg2 accesses. Indeed, the cost model wrongly assumed that reg1 + reg2
needs a temporary register for the computation, whereas it was correctly
estimated for reg1 + scale * reg2.

<rdar://problem/13973908>

llvm-svn: 183021
2013-05-31 17:20:29 +00:00
Ahmed Bougacha f1ed334d55 Add a way to define the bit range covered by a SubRegIndex.
NOTE: If this broke your out-of-tree backend, in *RegisterInfo.td, change
the instances of SubRegIndex that have a comps template arg to use the
ComposedSubRegIndex class instead.

In TableGen land, this adds Size and Offset attributes to SubRegIndex,
and the ComposedSubRegIndex class, for which the Size and Offset are
computed by TableGen. This also adds an accessor in MCRegisterInfo, and
Size/Offsets for the X86 and ARM subreg indices.

llvm-svn: 183020
2013-05-31 17:08:36 +00:00
Benjamin Kramer 4d5bae1679 Testcase for r183015.
I hate svn add.

llvm-svn: 183019
2013-05-31 17:01:30 +00:00
Ted Kremenek 7c6b4084dd [analyzer; new edges] add simplifySimpleBranches() to reduce edges for branches.
In many cases, the edge from the "if" to the condition, followed by an edge from the branch condition to the target code, is uninteresting.

In such cases, we should fold the two edges into one from the "if" to the target.

This also applies to loops.

Implements <rdar://problem/14034763>.

llvm-svn: 183018
2013-05-31 16:56:54 +00:00
Andrew Trick 3c944ba2f0 Unit test for SCEV fix r182989, PR16130.
llvm-svn: 183017
2013-05-31 16:42:41 +00:00
Kai Nacke e1823b6b85 Remove useless code from transitioning to new EH scheme
Removes all uses of the variable UsesNewEH. Simply return false in case that no
resume instructions were found.

llvm-svn: 183016
2013-05-31 16:30:36 +00:00
Benjamin Kramer 82598ecff2 Disable non-standard library builtins in non-gnu language modes.
Fixes PR16138.

llvm-svn: 183015
2013-05-31 16:29:28 +00:00
Daniel Jasper da6f225ef9 Improve clang-format's c-style cast detection.
Before:
  x[(uint8) y];
  x = (uint8) y;
  void f() { x = (uint8) y; }
  #define AA(X) sizeof(((X *) NULL)->a)

After:
  x[(uint8)y];
  x = (uint8)y;
  void f() { x = (uint8)y; }
  #define AA(X) sizeof(((X *)NULL)->a)

llvm-svn: 183014
2013-05-31 16:14:28 +00:00
Tim Northover 4d14144024 ARM: permit upper-case BE/LE on setend instruction
Patch by Amaury de la Vieuville.

llvm-svn: 183012
2013-05-31 15:58:45 +00:00
Tim Northover 4173e29a98 ARM: add fstmx and fldmx instructions for assembly
These instructions are deprecated oddities, but we still need to be able to
disassemble (and reassemble) them if and when they're encountered.

Patch by Amaury de la Vieuville.

llvm-svn: 183011
2013-05-31 15:55:51 +00:00
Daniel Jasper ab8128b01d Fix test error caused by r183008.
llvm-svn: 183010
2013-05-31 15:15:41 +00:00
Daniel Jasper 393564fdfe Improve clang-format's error recovery.
If a "}" is found inside parenthesis, this is probably a case of
missing parenthesis. This enables continuing to format after stuff code
like:

class A {
  void f(
};
..

llvm-svn: 183009
2013-05-31 14:56:29 +00:00
Daniel Jasper a9eb2aafa1 Make formatting of empty blocks more consistent.
With this patch, the simplified rule is:
If the block is part of a declaration (class, namespace, function,
enum, ..), merge an empty block onto a single line. Otherwise
(specifically for the compound statements of if, for, while, ...),
keep the braces on two separate lines.

The reasons are:
- Mostly the formatting of empty blocks does not matter much.
- Empty compound statements are really rare and are usually just
  inserted while still working on the code. If they are on two lines,
  inserting code is easier. Also, overlooking the "{}" of an
  "if (...) {}" can be really bad.
- Empty declarations are not uncommon, e.g. empty constructors. Putting
  them on one line saves vertical space at no loss of readability.

llvm-svn: 183008
2013-05-31 14:56:20 +00:00
Daniel Jasper 2c611c0341 Properly format nested conditional operators.
Before:
bool aaaaaa = aaaaaaaaaaaaa //
                  ? aaaaaaaaaaaaaaa
                  : bbbbbbbbbbbbbbb //
                  ? ccccccccccccccc
                  : ddddddddddddddd;

After:
bool aaaaaa = aaaaaaaaaaaaa //
                  ? aaaaaaaaaaaaaaa
                  : bbbbbbbbbbbbbbb //
                        ? ccccccccccccccc
                        : ddddddddddddddd;

llvm-svn: 183007
2013-05-31 14:56:12 +00:00