- Jan 07, 2013
-
-
Jordan Rose authored
This is necessary not only for representing empty ranges, but for handling multibyte characters in the input. (If the end pointer in a range refers to a multibyte character, should it point to the beginning or the end of the character in a char array?) Some of the code in the asm parsers was already assuming this anyway. llvm-svn: 171765
-
Shuxin Yang authored
llvm-svn: 171764
-
Dmitri Gribenko authored
<Declaration> tag llvm-svn: 171763
-
Quentin Colombet authored
turning a code like this: if (foo) free(foo) into that: free(foo) Move a call to free from basic block FB into FB's predecessor, P, when the path from P to FB is taken only if the argument of free is not equal to NULL. Some restrictions apply on P and FB to be sure that this code motion is profitable. Namely: 1. FB must have only one predecessor P. 2. FB must contain only the call to free plus an unconditional branch to S. 3. P's successors are FB and S. Because of 1., we will not increase the code size when moving the call to free from FB to P. Because of 2., FB will be empty after the move. Because of 2. and 3., P's branch instruction becomes useless, so as FB (simplifycfg will do the job). llvm-svn: 171762
-
Manuel Klimek authored
Previous indent: class A { } a; void f() { }; With this patch: class A { } a; void f() { } ; The patch introduces a production for classes and structs, and parses the rest of the line to the semicolon after the class scope. This allowed us to remove a long-standing wart in the parser that would just much the semicolon after any block. Due to this suboptimal formating some tests were broken. Some unrelated formatting tests broke; those hit a bug in the ast printing, and need to be fixed separately. llvm-svn: 171761
-
Alexander Kornienko authored
http://llvm-reviews.chandlerc.com/D234 Patch by Philip Craig! llvm-svn: 171760
-
David Blaikie authored
llvm-svn: 171759
-
Joel Jones authored
llvm-svn: 171758
-
Michael Han authored
Following r168626, in class declaration or definition, there are a combination of syntactic locations where C++11 attributes could appear, and among those the only valid location permitted by standard is between class-key and class-name. So for those attributes appear at wrong locations, fixit is used to move them to expected location and we recover by applying them to the class specifier. llvm-svn: 171757
-
Douglas Gregor authored
rehashed, invaliding the iterator walking through the identifier table. Separate out the identification of out-of-date identifiers from updating them. llvm-svn: 171756
-
David Tweed authored
with respect to the lower "left-hand-side bitwidth" bits, even when negative); see OpenCL spec 6.3j. This patch both implements this behaviour in the code generator and "constant folding" bits of Sema, and also prevents tests to detect undefinedness in terms of the weaker C99 or C++ specifications from being applied. llvm-svn: 171755
-
Nico Weber authored
Before: throw a *b; Now: throw a * b; llvm-svn: 171754
-
Nico Weber authored
llvm-svn: 171753
-
Nico Weber authored
llvm-svn: 171752
-
Nico Weber authored
llvm-svn: 171751
-
NAKAMURA Takumi authored
llvm-svn: 171750
-
Chandler Carruth authored
llvm-svn: 171749
-
Daniel Jasper authored
This should make it slightly more readable as it more clearly separates what happens where. No intended functional changes. More of this to come.. llvm-svn: 171748
-
Chandler Carruth authored
library rename. llvm-svn: 171747
-
Chandler Carruth authored
implementation lives already. llvm-svn: 171746
-
Nico Weber authored
This matches the test change done in clang at r171742. Without this, clang-format would strip '@' characters and format e.g. '@interface' as 'interface'. llvm-svn: 171743
-
Nico Weber authored
Also set ObjC1 in the formatter tests. The only effect of this flag in the lexer is that '@' now gets turned into tok::at instead of tok::unknown. llvm-svn: 171742
-
Chandler Carruth authored
builder these days, and this thing hasn't seen updates for a very long time. llvm-svn: 171741
-
Nico Weber authored
llvm-svn: 171740
-
Chandler Carruth authored
peculiar headers under include/llvm. This struct still doesn't make a lot of sense, but it makes more sense down in TargetLowering than it did before. llvm-svn: 171739
-
Chandler Carruth authored
already in a class, just inline the four of them. I suspect that this class could be simplified some to not always keep distinct variables for these things, but it wasn't clear to me how given the usage so I opted for a trivial and mechanical translation. This removes one of the two remaining users of a header in include/llvm which does nothing more than define a 4 member struct. llvm-svn: 171738
-
Manuel Klimek authored
llvm-svn: 171737
-
Daniel Jasper authored
llvm-svn: 171736
-
Chandler Carruth authored
TargetTransformInfo rather than TargetLowering, removing one of the primary instances of the layering violation of Transforms depending directly on Target. This is a really big deal because LSR used to be a "special" pass that could only be tested fully using llc and by looking at the full output of it. It also couldn't run with any other loop passes because it had to be created by the backend. No longer is this true. LSR is now just a normal pass and we should probably lift the creation of LSR out of lib/CodeGen/Passes.cpp and into the PassManagerBuilder. =] I've not done this, or updated all of the tests to use opt and a triple, because I suspect someone more familiar with LSR would do a better job. This change should be essentially without functional impact for normal compilations, and only change behvaior of targetless compilations. The conversion required changing all of the LSR code to refer to the TTI interfaces, which fortunately are very similar to TargetLowering's interfaces. However, it also allowed us to *always* expect to have some implementation around. I've pushed that simplification through the pass, and leveraged it to simplify code somewhat. It required some test updates for one of two things: either we used to skip some checks altogether but now we get the default "no" answer for them, or we used to have no information about the target and now we do have some. I've also started the process of removing AddrMode, as the TTI interface doesn't use it any longer. In some cases this simplifies code, and in others it adds some complexity, but I think it's not a bad tradeoff even there. Subsequent patches will try to clean this up even further and use other (more appropriate) abstractions. Yet again, almost all of the formatting changes brought to you by clang-format. =] llvm-svn: 171735
-
David Tweed authored
llvm-svn: 171734
-
David Tweed authored
bogus comparison operands to default to eq/oeq. Fix that, fix a couple of tests that accidentally passed and test for bogus comparison opeartors explicitly. llvm-svn: 171733
-
Daniel Jasper authored
All changes done by clang-format itself. No functional changes. llvm-svn: 171732
-
Daniel Jasper authored
This addresses llvm.org/PR14830. Before: unsigned Cost = TTI.getMemoryOpCost(I->getOpcode(), VectorTy, SI->getAlignment(), SI->getPointerAddressSpace()); CharSourceRange LineRange = CharSourceRange::getTokenRange(TheLine.Tokens.front().Tok.getLocation(), TheLine.Tokens.back().Tok.getLocation()); After: unsigned Cost = TTI.getMemoryOpCost(I->getOpcode(), VectorTy, SI->getAlignment(), SI->getPointerAddressSpace()); CharSourceRange LineRange = CharSourceRange::getTokenRange( TheLine.Tokens.front().Tok.getLocation(), TheLine.Tokens.back().Tok.getLocation()); This required rudimentary changes to static initializer lists, but we are not yet formatting them in a reasonable way. That will be done in a subsequent patch. llvm-svn: 171731
-
Silviu Baranga authored
Make the MergeGlobals pass correctly handle the address space qualifiers of the global variables. We partition the set of globals by their address space, and apply the same the trasnformation as before to merge them. llvm-svn: 171730
-
Dmitri Gribenko authored
llvm-svn: 171729
-
NAKAMURA Takumi authored
llvm-svn: 171728
-
NAKAMURA Takumi authored
Some compilers might be confused if bool were potentially signed integer. In my case, g++-4.7.0 miscompiled CodeGen/ARM. llvm-svn: 171727
-
Chandler Carruth authored
being present. Make a member of one of the helper classes a reference as part of this. Reformatting goodness brought to you by clang-format. llvm-svn: 171726
-
Daniel Jasper authored
In LLVM style, a single space should be enough. In Google style, two spaces are required. llvm-svn: 171725
-
Daniel Jasper authored
Before: virtual void write(ELFWriter *writer, OwningPtr<FileOutputBuffer> &buffer) = 0 After: virtual void write(ELFWriter *writerrr, OwningPtr<FileOutputBuffer> &buffer) = 0; This addresses llvm.org/PR14815. To implement this I introduced a line type during parsing and moved the definition of TokenType out of the struct for increased readability. Should have done the latter in a separate patch, but it would be hard to pull apart now. llvm-svn: 171724
-