summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Try to not emit the dead side of ?: if the condition is a constant.Chris Lattner2008-11-111-4/+21
| | | | llvm-svn: 59061
* Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵Sebastian Redl2008-11-113-25/+11
| | | | | | expressions, both of values and types. llvm-svn: 59057
* Add CodeGenFunction::EmitBranch.Daniel Dunbar2008-11-116-41/+40
| | | | | | | - Emits an unconditional branch, with extra logic to avoid generating spurious branches out of dummy blocks. llvm-svn: 59037
* short circuit && and || when possible. This substantially reducesChris Lattner2008-11-114-28/+64
| | | | | | | | the size of the -O0 output on some cases. For example, on expr.c from 176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed references to two external symbols. llvm-svn: 59034
* Make codegen smart enough to not emit the dead side of an if whoseChris Lattner2008-11-111-5/+49
| | | | | | | condition is a constant. This shrinks -O0 codegen by quite a bit on some cases. llvm-svn: 59033
* implement debug info for typeof()Chris Lattner2008-11-111-6/+9
| | | | llvm-svn: 59032
* Add CodeGenFunction::EmitDummyBlock for marking places where we makeDaniel Dunbar2008-11-113-7/+16
| | | | | | | "dummy" blocks (blocks just used to make sure we have a place to dump code to). llvm-svn: 59022
* Remove CodeGenFunction::StartBlock.Daniel Dunbar2008-11-112-14/+4
| | | | | | - Was confusing and only used in one small part of the code. llvm-svn: 59020
* Centralize basic block creation in CodeGenFunction::createBasicBlock.Daniel Dunbar2008-11-119-68/+73
| | | | | | - No functionality change. llvm-svn: 59017
* don't preserve names on IR instructions. This matches llvm-gcc's behavior andChris Lattner2008-11-101-1/+2
| | | | | | speeds up the compiler by ~8% at -emit-llvm -O0. llvm-svn: 58977
* Fix even more bugs in debug info support:Chris Lattner2008-11-101-5/+0
| | | | | | | | | 1. emit proper debug info for forward decls of structs. 2. emit DW_TAG_member nodes around members of a field like llvm-gcc does. This slows down debug info generation, but is required for correctness. llvm-svn: 58973
* reimplement debug info generation in terms of DebugInfo.h instead ofChris Lattner2008-11-103-722/+410
| | | | | | | using MachineModuleInfo. This runs at about the same speed as the old code, but fixes a bunch of bugs and is simpler and shorter. llvm-svn: 58971
* Support named operands in inline asm statements.Anders Carlsson2008-11-091-6/+51
| | | | llvm-svn: 58940
* Avoid redundant cast<>s / simplify type dispatch.Daniel Dunbar2008-11-082-45/+34
| | | | llvm-svn: 58892
* "Fix" PR3021, don't crash on generating record types when we can'tDaniel Dunbar2008-11-081-2/+6
| | | | | | generate the type of a member. llvm-svn: 58889
* LinkageSpecDecl is c++ specific, move it to DeclCXXChris Lattner2008-11-041-0/+1
| | | | llvm-svn: 58704
* Add a new expression class, ObjCSuperExpr, to handle the Objective-C ↵Douglas Gregor2008-11-043-6/+10
| | | | | | 'super'. Remove ObjCThis from PredefinedExpr llvm-svn: 58698
* Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for ↵Anders Carlsson2008-11-044-4/+55
| | | | | | now). llvm-svn: 58681
* Fix bug in va_copyAnders Carlsson2008-11-041-1/+1
| | | | llvm-svn: 58680
* privatize some methods.Chris Lattner2008-11-031-0/+3
| | | | llvm-svn: 58602
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-0110-45/+61
| | | | | | - No functionality change. llvm-svn: 58546
* Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wcharSanjiv Gupta2008-10-311-1/+1
| | | | | | | | | | etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. llvm-svn: 58501
* Debug info: Bug fix, function types should always include the returnDaniel Dunbar2008-10-311-1/+1
| | | | | | type. llvm-svn: 58497
* Quick fix for PR2950, infinite loop generating debug info forDaniel Dunbar2008-10-312-20/+25
| | | | | | | recursive types. - Style will be clean up in further patches. llvm-svn: 58490
* Formatting tweaks.Daniel Dunbar2008-10-312-18/+17
| | | | | | - No functionality change. llvm-svn: 58488
* NeXT: Emit protocol objects lazily.Daniel Dunbar2008-10-291-21/+76
| | | | | | | | | | - That is, the metadata for a protocol is only emitted if that protocol is actually used in the translation unit. This is important because Objective-C headers frequently contain a large number of protocol definitions, only a few of which will be used in any given file. llvm-svn: 58400
* Fix for PR2966: va_start/va_end use the *address* of the Eli Friedman2008-10-291-1/+1
| | | | | | | | | | | va_list, not the value. Patch fixes an assert on x86-64 and a wrong-code bug on x86. I'm not completely sure, but I think it's a regression from r58306. Does anyone run regression tests regularly on x86-64? The crash should have been picked up there. llvm-svn: 58366
* Don't run the verifier as part of IRgen, this is now down (per module)Daniel Dunbar2008-10-282-13/+0
| | | | | | in the driver (this means we no longer run the verifier per function, however). llvm-svn: 58307
* Add attribute always_inline support.Daniel Dunbar2008-10-281-0/+3
| | | | llvm-svn: 58304
* make codegen reject initializes with designators, like this:Chris Lattner2008-10-263-2/+24
| | | | | | | | t.c:1:13: error: cannot codegen this designators yet int a[10] = {2, 4, [8]=9, 10}; ^~~~~~~~~~~~~~~~~ llvm-svn: 58220
* CMake: Builds and installs clang binary and libs (no docs yet). ItOscar Fuentes2008-10-261-0/+22
| | | | | | must be under the `tools' subdirectory of the LLVM *source* tree. llvm-svn: 58180
* Don't crash on invalid source locations inDaniel Dunbar2008-10-241-3/+6
| | | | | | CGDebugInfo::getOrCreateCompileUnit. llvm-svn: 58081
* Map compilation units using FileEntry pointers instead ofDaniel Dunbar2008-10-242-11/+8
| | | | | | | | | FileIDs. This seems better conceptually and lets the SourceManager handle details of mapping the location to a file ID. - In practice, fixes an assert because this code wasn't using getPhysicalLoc. llvm-svn: 58055
* Add GetModule accessor to ModuleBuilderDaniel Dunbar2008-10-211-0/+4
| | | | llvm-svn: 57924
* Preliminary support for function overloadingDouglas Gregor2008-10-211-2/+2
| | | | llvm-svn: 57909
* Debug info bug fix, function start wasn't getting generated correctlyDaniel Dunbar2008-10-185-24/+24
| | | | | | for Obj-C methods. llvm-svn: 57769
* Emit more descriptive unsupported error message on dot-syntax use of super.Daniel Dunbar2008-10-171-0/+2
| | | | llvm-svn: 57745
* Add FIXME about potential problem in how property ref lvalues are handled.Daniel Dunbar2008-10-171-0/+3
| | | | llvm-svn: 57743
* Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.Daniel Dunbar2008-10-172-23/+28
| | | | | | | - Shouldn't assume predefined expr is a function printing one. - Uses CGM functionality to cache function names per module. llvm-svn: 57737
* Add option argument to GetAddrOfConstantString to use for name ofDaniel Dunbar2008-10-172-10/+23
| | | | | | | (first) global holding the string. - No functionality change. llvm-svn: 57736
* Emit error unsupported when asm string conversion fails instead ofDaniel Dunbar2008-10-171-3/+13
| | | | | | assert. llvm-svn: 57721
* Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.Daniel Dunbar2008-10-173-12/+4
| | | | llvm-svn: 57716
* More Obj-C type encoding improvements.Daniel Dunbar2008-10-171-1/+2
| | | | | | | - Encode unions and bit-fields correctly. - Accept option to name record fields (used for NeXT runtime). llvm-svn: 57685
* Change CGDebugInfo::setLocation to just ignore invalid locations. ThisDaniel Dunbar2008-10-176-23/+16
| | | | | | | | | simplifies clients. Also, add assert that RegionStack is empty when the CGDebugInfo is destroyed. llvm-svn: 57684
* NeXT: Use objc_msgSend_fpret for calling functions which returnDaniel Dunbar2008-10-171-14/+40
| | | | | | floating point. This is only correct for x86-32 at the moment. llvm-svn: 57667
* Quick patch for PR2784, assert genereting debug info for opaqueDaniel Dunbar2008-10-171-1/+9
| | | | | | | | | | structure. - I'm not sure yet about the behavior, but this at least prevents the crash. Add some asserts on RegionStack usage. llvm-svn: 57661
* Added pinsrd, pinsrq, and some other vector intrinsicsMon P Wang2008-10-151-0/+4
| | | | llvm-svn: 57563
* Simplify handling of struct/union/class tags.Argyrios Kyrtzidis2008-10-151-6/+2
| | | | | | | Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl. Cleans up the code a bit and better reflects that Decl class structure. llvm-svn: 57541
* Lift out ABIInfo abstract base class.Daniel Dunbar2008-10-133-21/+102
| | | | | | | | - Currently still lives in CGCall.cpp but is intended to be the target specific place for hooking ABI information. - Select ABIInfo to use based on Target's prefix and pointer width. llvm-svn: 57445
* silence release-assert warnings.Chris Lattner2008-10-124-11/+12
| | | | llvm-svn: 57392
OpenPOWER on IntegriCloud