summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate a compile time warning.Evan Cheng2008-09-071-1/+1
| | | | llvm-svn: 55878
* Handle x86 truncate to i8 with target hook for now.Evan Cheng2008-09-072-0/+50
| | | | llvm-svn: 55877
* Fix indentation of generated code.Evan Cheng2008-09-071-1/+1
| | | | llvm-svn: 55876
* Ignore multi-instruction patterns. e.g.Evan Cheng2008-09-071-0/+14
| | | | | | | def : Pat<(i8 (trunc GR32:$src)), (i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))> llvm-svn: 55875
* fix crash when the malloc/free function is defined or is a declaration with ↵Nuno Lopes2008-09-061-4/+2
| | | | | | | | 0 parameters. this pass doesnt seem to be used, but still it's now a little more correct llvm-svn: 55873
* When PruneEH turned an invoke into an ordinaryDuncan Sands2008-09-064-1/+1463
| | | | | | | | | | | | call (thus changing the call site) it didn't inform the callgraph about this. But the call site does matter - as shown by the testcase, the callgraph become invalid after the inliner ran (with an edge between two functions simply missing), resulting in wrong deductions by GlobalsModRef. llvm-svn: 55872
* skip test if llvm-gcc is requires but not found on the path.Nuno Lopes2008-09-061-0/+14
| | | | | | someone with llvm-gcc installed please test if the Codegen/function-attributes.c test isn't skip in your system. thanks. llvm-svn: 55871
* Key LLVM types for TagDecl's off of the clang Type, since there is nowDaniel Dunbar2008-09-062-15/+27
| | | | | | a many-to-one relationship between TagDecl's and types. llvm-svn: 55870
* Per PR2773, define __USER_LABEL_PREFIX__ for x86-32 Linux and Windows.Eli Friedman2008-09-061-0/+2
| | | | | | | | | | If you're on some other platform, the correct definition for this macro would be appreciated; to find the correct definition, just run the following command: echo | gcc -dM -E - | grep USER_LABEL_PREFIX llvm-svn: 55869
* Fix constant pool loads, and remove broken versions of addConstantPoolReference.Owen Anderson2008-09-065-45/+10
| | | | llvm-svn: 55868
* Fix the X86 addConstantPoolReference, which had the operands in the wrong order.Owen Anderson2008-09-061-1/+2
| | | | llvm-svn: 55867
* Next limited float precision expansion (log2 12 bits)Dale Johannesen2008-09-051-3/+43
| | | | llvm-svn: 55866
* Revert r55859. This is breaking the build in the abscence of its companion ↵Owen Anderson2008-09-055-16/+41
| | | | | | commit. llvm-svn: 55865
* Fix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x Eli Friedman2008-09-052-0/+19
| | | | | | | | | i32>. This is a little messy, but it works. We should really get rid of the intrinsics, though, since they map perfectly well to standard LLVM instructions. llvm-svn: 55864
* Move the code that inserts copies for function livein registersDan Gohman2008-09-052-109/+113
| | | | | | | | | out of ScheduleDAGEmit.cpp and into SelectionDAGISel.cpp. This allows it to be run exactly once per function, even if multiple SelectionDAG iterations happen in the entry block, as may happen with FastISel. llvm-svn: 55863
* More type checking for blocks. Still incomplete (will hopefully finish up ↵Steve Naroff2008-09-057-31/+217
| | | | | | this weekend). llvm-svn: 55862
* Remove unused map.Devang Patel2008-09-051-1/+0
| | | | llvm-svn: 55861
* Mark math lib intrinsics readonly, on the groundsDale Johannesen2008-09-051-1/+4
| | | | | | | | | that they read the rounding mode. This is conservatively correct, which they weren't before. We can do more optimization on these if we actually model the rounding mode. llvm-svn: 55860
* Delete the removeCallEdgeTo callgraph method,Duncan Sands2008-09-054-29/+12
| | | | | | | | | | | | | | | because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. llvm-svn: 55859
* Prevent our own passes from promoting this toDuncan Sands2008-09-051-1/+1
| | | | | | readonly. llvm-svn: 55858
* Fix X86FastISel's shift and select code to reject illegal types.Dan Gohman2008-09-051-1/+9
| | | | llvm-svn: 55857
* Add the next limited-precision expansion.Dale Johannesen2008-09-051-3/+42
| | | | llvm-svn: 55856
* Fix the opcodes used by X86FastISel for shifts and conditional moves.Dan Gohman2008-09-051-11/+11
| | | | llvm-svn: 55855
* Factor out code that emits load and store instructions.Evan Cheng2008-09-051-111/+138
| | | | llvm-svn: 55854
* Rename method.Owen Anderson2008-09-052-5/+7
| | | | llvm-svn: 55853
* Fix test.Evan Cheng2008-09-051-2/+2
| | | | llvm-svn: 55849
* FastISel support for AND and OR with type i1.Dan Gohman2008-09-051-2/+10
| | | | llvm-svn: 55846
* Add hooks for other intrinsics to get low-precision expansions.Dale Johannesen2008-09-052-12/+60
| | | | llvm-svn: 55845
* X86FastISel support for shifts and conditional moves.Dan Gohman2008-09-051-0/+99
| | | | llvm-svn: 55844
* FastISel support for ConstantExprs.Dan Gohman2008-09-052-9/+28
| | | | llvm-svn: 55843
* Revert r55817. It broke PIC. FastISel will need to find a differentDan Gohman2008-09-051-3/+1
| | | | | | approach here. llvm-svn: 55842
* Add comment back that Argiris pointed out that I mistakenly removed (the ↵Ted Kremenek2008-09-051-0/+2
| | | | | | comments below it were stale, so I accidently removed the whole thing). llvm-svn: 55841
* If SSE2 is available, x86 should pass first 3 f32/f64 arguments in XMM ↵Evan Cheng2008-09-054-5/+21
| | | | | | registers for fastcc calls. llvm-svn: 55840
* Change struct forward declarations and definitions to use unique ↵Ted Kremenek2008-09-0511-96/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). llvm-svn: 55839
* Add a variant of AnalyzeCallOperands that can be used by fast isel.Evan Cheng2008-09-052-0/+23
| | | | llvm-svn: 55838
* Use removeAllCalledFunctions rather than removingDuncan Sands2008-09-051-5/+3
| | | | | | edges one by one by hand. llvm-svn: 55836
* Remove trailing whitespace.Duncan Sands2008-09-051-36/+36
| | | | llvm-svn: 55835
* Strip trailing whitespace.Duncan Sands2008-09-051-14/+14
| | | | llvm-svn: 55834
* Support "typeof unary-expression" (GNU C++ extension).Argyrios Kyrtzidis2008-09-052-4/+29
| | | | llvm-svn: 55833
* Set different header search paths for the Windows platform.Argyrios Kyrtzidis2008-09-051-9/+17
| | | | llvm-svn: 55832
* Make this pass return that it made a change ifDuncan Sands2008-09-051-1/+5
| | | | | | it modifies a functions attributes. llvm-svn: 55831
* Add header search paths for Mingw32 (GCC version 4).Argyrios Kyrtzidis2008-09-051-0/+9
| | | | llvm-svn: 55830
* Line endings: CRLF -> LFArgyrios Kyrtzidis2008-09-052-15/+15
| | | | llvm-svn: 55829
* "Fix" PR2762. The testcase now crashes codegenDuncan Sands2008-09-051-1/+19
| | | | | | | elsewhere due to a missing pattern for v2f64 = sint_to_fp v2i32. That is PR2687. llvm-svn: 55828
* Fix placement of const on a number of X86 builtins.Daniel Dunbar2008-09-051-5/+5
| | | | llvm-svn: 55827
* Test case for previous commit (Workaround gcc bug causing crash on ourDaniel Dunbar2008-09-051-0/+3
| | | | | | preprocessed outputs) llvm-svn: 55826
* Workaround gcc bug causing crash on our preprocessed outputs.Daniel Dunbar2008-09-051-44/+45
| | | | | | | | | | | | - gcc is not happy if we start a preprocessed file with #line 1 "XXX" 1 - Workaround by making sure file starts with a simple #line change. Also, factored WriteLineInfo out. Also, fixed bug where FileType was not being correctly updated. llvm-svn: 55825
* Fix a search+replace-o.Dan Gohman2008-09-051-1/+1
| | | | llvm-svn: 55824
* Add -flimit-float-precision to enable some faster,Dale Johannesen2008-09-052-3/+57
| | | | | | | | | but less accurate (non-IEEE) code sequences for certain math library functions. Add the first of several such expansions. Don't worry, if you don't turn it on it won't affect you. llvm-svn: 55823
* Remove stale comments.Ted Kremenek2008-09-051-8/+0
| | | | llvm-svn: 55822
OpenPOWER on IntegriCloud