- May 28, 2014
-
-
Jim Grosbach authored
llvm-svn: 209770
-
Sanjay Patel authored
llvm-svn: 209768
-
Sanjay Patel authored
llvm-svn: 209763
-
Rafael Espindola authored
This reverts commit r209746. It looks it is causing a crash while building libcxx. I am trying to get a reduced testcase. llvm-svn: 209762
-
Reid Kleckner authored
Previously, DataTypes.h would #define a variety of symbols any time they weren't already defined. However, some versions of Visual Studio do provide the appropriate headers, so if those headers are included after DataTypes.h, it can lead to macro redefinition warnings. The fix is to include the appropriate headers if they exist, and only #define the symbols if the required header does not exist. Patch by Zachary Turner! --- The big change here is that we no longer have our own stdint.h typedefs because now all supported toolchains have stdint.h. Hooray! llvm-svn: 209760
-
Rafael Espindola authored
This matches gcc's behavior. It also seems natural given that aliases contain other properties that govern how it is accessed (linkage, visibility, dll storage). Clang still has to be updated to expose this feature to C. llvm-svn: 209759
-
Louis Gerbarg authored
Currently LLVM will generally merge GEPs. This allows backends to use more complex addressing modes. In some cases this is not happening because there is PHI inbetween the two GEPs: GEP1--\ |-->PHI1-->GEP3 GEP2--/ This patch checks to see if GEP1 and GEP2 are similiar enough that they can be cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123): GEP1--\ --\ --\ |-->PHI1-->GEP3 ==> |-->PHI2->GEP12->GEP3 == > |-->PHI2->GEP123 GEP2--/ --/ --/ This also breaks certain use chains that are preventing GEP->GEP merges that the the existing instcombine would merge otherwise. Tests included. llvm-svn: 209755
-
Hal Finkel authored
This reverts r208640 (I've just XFAILed the test) because it broke ppc64/Linux self-hosting. Because nearly every regression test triggers a segfault, I hope this will be easy to fix. llvm-svn: 209747
-
Rafael Espindola authored
This patch implements two things: 1. If we know one number is positive and another is negative, we return true as signed addition of two opposite signed numbers will never overflow. 2. Implemented TODO : If one of the operands only has one non-zero bit, and if the other operand has a known-zero bit in a more significant place than it (not including the sign bit) the ripple may go up to and fill the zero, but won't change the sign. e.x - (x & ~4) + 1 We make sure that we are ignoring 0 at MSB. Patch by Suyog Sarda. llvm-svn: 209746
-
Hal Finkel authored
This reverts commit r209638 because it broke self-hosting on ppc64/Linux. (the Clang-compiled TableGen would segfault because it jumped to an invalid address from within _ZNK4llvm17ManagedStaticBase21RegisterManagedStaticEPFPvvEPFvS1_E (which is within the command-line parameter registration process)). llvm-svn: 209745
-
Joerg Sonnenberger authored
it is set. llvm-svn: 209742
-
Evgeniy Stepanov authored
llvm-svn: 209721
-
Tilmann Scheller authored
Add regression tests for the following transformation: str X, [x20] ... add x20, x20, #32 -> str X, [x20], #32 with X being either w0, x0, s0, d0 or q0. llvm-svn: 209715
-
Justin Bogner authored
Add an __lldb_init_module function so that importing the lldbDataFormatters script automatically adds the formatters. llvm-svn: 209712
-
Tilmann Scheller authored
Add regression tests for the following transformation: ldr X, [x20] ... add x20, x20, #32 -> ldr X, [x20], #32 with X being either w0, x0, s0, d0 or q0. llvm-svn: 209711
-
Alexey Samsonov authored
Use more straightforward way to represent the set of instruction ranges where the location of a user variable is defined - vector of pairs of instructions (defining start/end of each range), instead of a flattened vector of instructions where some instructions are supposed to start the range, and the rest are supposed to "clobber" it. Simplify the code which generates actual .debug_loc entries. No functionality change. llvm-svn: 209698
-
Alexey Samsonov authored
llvm-svn: 209697
-
Sebastian Pop authored
This is a corner case I have stumbled upon when dealing with ARM64 type conversions. I was not able to extract a testcase for the community codebase to fail on. The patch conservatively discards a division that would have ended up in an ICE due to a type mismatch when building a multiply expression. I have also added code to a place that builds add expressions and in which we should be careful not to pass in operands of different types. llvm-svn: 209694
-
Sebastian Pop authored
We do not need to compute the GCD anymore after we removed the constant coefficients from the terms: the terms are now all parametric expressions and there is no need to recognize constant terms that divide only a subset of the terms. We only rely on the size of the terms, i.e., the number of operands in the multiply expressions, to sort the terms and recognize the parametric dimensions. llvm-svn: 209693
-
Sebastian Pop authored
No functional change is intended: instead of relying on the delinearization to come up with the base pointer as a remainder of the divisions in the delinearization, we just compute it from the array access and use that value. We substract the base pointer from the SCEV to be delinearized and that simplifies the work of the delinearizer. llvm-svn: 209692
-
Sebastian Pop authored
The delinearization is needed only to remove the non linearity induced by expressions involving multiplications of parameters and induction variables. There is no problem in dealing with constant times parameters, or constant times an induction variable. For this reason, the current patch discards all constant terms and multipliers before running the delinearization algorithm on the terms. The only thing remaining in the term expressions are parameters and multiply expressions of parameters: these simplified term expressions are passed to the array shape recognizer that will not recognize constant dimensions anymore: these will be recognized as different strides in parametric subscripts. The only important special case of a constant dimension is the size of elements. Instead of relying on the delinearization to infer the size of an element, compute the element size from the base address type. This is a much more precise way of computing the element size than before, as we would have mixed together the size of an element with the strides of the innermost dimension. llvm-svn: 209691
-
Alexey Samsonov authored
Current implementation of calculateDbgValueHistory already creates the keys in the expected order (user variables are listed in order of appearance), and should do so later by contract. No functionality change. llvm-svn: 209690
-
Arnaud A. de Grandmaison authored
opt can handle them by itself. llvm-svn: 209689
-
- May 27, 2014
-
-
Arnaud A. de Grandmaison authored
No functional change. llvm-svn: 209688
-
Reid Kleckner authored
llvm-svn: 209687
-
David Blaikie authored
I'm not sure exactly where/how we end up with an abstract DbgVariable with a null DIE, but we do... looking into it & will add a test and/or fix when I figure it out. Currently shows up in selfhost or compiler-rt builds. llvm-svn: 209683
-
David Blaikie authored
Originally committed in r207717, I clearly didn't look very closely at the code to understand how existing things were working... llvm-svn: 209680
-
Sasa Stankovic authored
%higher and %highest can have non-zero values only for offsets greater than 2GB, which is highly unlikely, if not impossible when compiling a single function. This makes long branch for MIPS64 3 instructions smaller. Differential Revision: http://llvm-reviews.chandlerc.com/D3281.diff llvm-svn: 209678
-
David Blaikie authored
DebugInfo: Create abstract function definitions even when concrete definitions preceed inline definitions. After much puppetry, here's the major piece of the work to ensure that even when a concrete definition preceeds all inline definitions, an abstract definition is still created and referenced from both concrete and inline definitions. Variables are still broken in this case (see comment in dbg-value-inlined-parameter.ll test case) and will be addressed in follow up work. llvm-svn: 209677
-
David Blaikie authored
llvm-svn: 209676
-
David Blaikie authored
A further step to correctly emitting concrete out of line definitions preceeding inlined instances of the same program. To do this, emission of subprograms must be delayed until required since we don't know which (abstract only (if there's no out of line definition), concrete only (if there are no inlined instances), or both) DIEs are required at the start of the module. To reduce the test churn in the following commit that actually fixes the bug, this commit introduces the lazy DIE construction and cleans up test cases that are impacted by the changes in the resulting DIE ordering. llvm-svn: 209675
-
David Blaikie authored
This is a precursor to fixing inlined debug info where the concrete, out-of-line definition may preceed any inlined usage. To cope with this, the attributes that may appear on the concrete definition or the abstract definition are delayed until the end of the module. Then, if an abstract definition was created, it is referenced (and no other attributes are added to the out-of-line definition), otherwise the attributes are added directly to the out-of-line definition. In a couple of cases this causes not just reordering of attributes, but reordering of types. When the creation of the attribute is delayed, if that creation would create a type (such as for a DW_AT_type attribute) then other top level DIEs may've been constructed during the delay, causing the referenced type to be created and added after those intervening DIEs. In the extreme case, in cross-cu-inlining.ll, this actually causes the DW_TAG_basic_type for "int" to move from one CU to another. llvm-svn: 209674
-
David Blaikie authored
DebugInfo: Separate out the addition of subprogram attribute additions so that they can be added later depending on whether or not the function is inlined. llvm-svn: 209673
-
Jingyue Wu authored
The test was outdated with r209537. llvm-svn: 209671
-
Jingyue Wu authored
This is an enhancement to SeparateConstOffsetFromGEP. With this patch, we can extract a constant offset from "s/zext and/or/xor A, B". Added a new test @ext_or to verify this enhancement. Refactoring the code, I also extracted some common logic to function Distributable. llvm-svn: 209670
-
David Blaikie authored
This old test didn't have the argument numbering that's now squirelled away in the high bits of the line number in the DW_TAG_arg_variable metadata. Add the numbering and update the test to ensure arguments are in-order. llvm-svn: 209669
-
Filipe Cabecinhas authored
Detected by Daniel Jasper, Ilia Filippov, and Andrea Di Biagio Fixed the argument order to select (the mask semantics to blendv* are the inverse of select) and fixed the tests Added parenthesis to the assert condition Ran clang-format llvm-svn: 209667
-
Tim Northover authored
llvm-svn: 209665
-
Tim Northover authored
llvm-svn: 209664
-
Bill Schmidt authored
In PPCISelLowering.cpp: PPCTargetLowering::LowerBUILD_VECTOR(), there is an optimization for certain patterns to generate one or two vector splats followed by a vector add or subtract. This operation is represented by a VADD_SPLAT in the selection DAG. Prior to this patch, it was possible for the VADD_SPLAT to be assigned the wrong data type, causing incorrect code generation. This patch corrects the problem. Specifically, the code previously assigned the value type of the BUILD_VECTOR node to the newly generated VADD_SPLAT node. This is correct much of the time, but not always. The problem is that the call to isConstantSplat() may return a SplatBitSize that is not the same as the number of bits in the original element vector type. The correct type to assign is a vector type with the same element bit size as SplatBitSize. The included test case shows an example of this, where the BUILD_VECTOR node has a type of v16i8. The vector to be built is {0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16}. isConstantSplat detects that we can generate a splat of 16 for type v8i16, which is the type we must assign to the VADD_SPLAT node. If we do not, we generate a vspltisb of 8 and a vaddubm, which generates the incorrect result {16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}. The correct code generation is a vspltish of 8 and a vadduhm. This patch also corrected code generation for CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll, which had been marked as an XFAIL, so we can remove the XFAIL from the test case. llvm-svn: 209662
-