Skip to content
  1. Feb 01, 2012
    • Dylan Noblesmith's avatar
      autoconf: generate clang's private config.h header · 57f439cb
      Dylan Noblesmith authored
      The CMake build already generated one. Follows clang r149497.
      
      This brings us one step closer to compiling and configuring clang
      separately from LLVM using the autoconf build, too.
      
      (I lack the right version of autoconf et al. to regen, but it
      was a simple change, so I just updated configure manually.)
      
      llvm-svn: 149498
      57f439cb
    • Dylan Noblesmith's avatar
      autoconf: add private config.h to clang · 96f0db0f
      Dylan Noblesmith authored
      This already exists in the CMake build, which is part of what makes
      building clang separately from llvm via cmake possible. This cleans up
      that discrepancy between the build systems (and sets the groundwork
      for configuring clang separately, too).
      
      llvm-svn: 149497
      96f0db0f
    • Dylan Noblesmith's avatar
      cmake: don't install config.h · c20ccdd7
      Dylan Noblesmith authored
      This header is private and shouldn't be used by clients.
      
      llvm-svn: 149496
      c20ccdd7
    • Dylan Noblesmith's avatar
      Frontend: fix comment typos · 9759e9b1
      Dylan Noblesmith authored
      llvm-svn: 149495
      9759e9b1
    • Elena Demikhovsky's avatar
      Passing AVX 256-bit structures in Win64 was wrong. · 824eed70
      Elena Demikhovsky authored
      Fixed Win64 calling conventions.
      
      llvm-svn: 149494
      824eed70
    • Elena Demikhovsky's avatar
      Shortened code in shuffle masks · 34cca175
      Elena Demikhovsky authored
      llvm-svn: 149493
      34cca175
    • Alexander Potapenko's avatar
      Disable wrapping memcpy() on Mac OS Lion, where it · c97434ec
      Alexander Potapenko authored
      actually falls back to memmove.
      In this case we still need to initialize real_memcpy, so we set it to
      real_memmove
      We check for MACOS_VERSION_SNOW_LEOPARD, because currently only Snow
      Leopard and Lion are supported.
      
      llvm-svn: 149492
      c97434ec
    • Alexander Potapenko's avatar
      Disables testing memcpy() on Mac OS 10.7, · f504602a
      Alexander Potapenko authored
      where memcpy() in fact aliases memmove() and thus calling it with
      overlapping parameters is not an error.
      
      llvm-svn: 149491
      f504602a
    • Richard Smith's avatar
      constexpr: check for overflow in pointer subtraction. · 1b470417
      Richard Smith authored
      This is a mess. According to the C++11 standard, pointer subtraction only has
      undefined behavior if the difference of the array indices does not fit into a
      ptrdiff_t.
      
      However, common implementations effectively perform a char* subtraction first,
      and then divide the result by the element size, which can cause overflows in
      some cases. Those cases are not considered to be undefined behavior by this
      change; perhaps they should be.
      
      llvm-svn: 149490
      1b470417
    • Greg Clayton's avatar
      Added many more python convenience accessors: · 6b2bd939
      Greg Clayton authored
      You can now access a frame in a thread using:
      
      lldb.SBThread.frame[int] -> lldb.SBFrame object for a frame in a thread
      
      Where "int" is an integer index. You can also access a list object with all of
      the frames using:
      
      lldb.SBThread.frames => list() of lldb.SBFrame objects
      
      All SB objects that give out SBAddress objects have properties named "addr"
      
      lldb.SBInstructionList now has the following convenience accessors for len() and
      instruction access using an index:
      
      insts = lldb.frame.function.instructions
      for idx in range(len(insts)):
          print insts[idx]
          
      Instruction lists can also lookup an isntruction using a lldb.SBAddress as the key:
      
      pc_inst = lldb.frame.function.instructions[lldb.frame.addr]
      
      lldb.SBProcess now exposes:
      
      lldb.SBProcess.is_alive => BOOL Check if a process is exists and is alive
      lldb.SBProcess.is_running => BOOL check if a process is running (or stepping):
      lldb.SBProcess.is_running => BOOL check if a process is currently stopped or crashed:
      lldb.SBProcess.thread[int] => lldb.SBThreads for a given "int" zero based index
      lldb.SBProcess.threads => list() containing all lldb.SBThread objects in a process
      
      SBInstruction now exposes:
      lldb.SBInstruction.mnemonic => python string for instruction mnemonic
      lldb.SBInstruction.operands => python string for instruction operands
      lldb.SBInstruction.command => python string for instruction comment
      
      SBModule now exposes:
      
      lldb.SBModule.uuid => uuid.UUID(), an UUID object from the "uuid" python module
      lldb.SBModule.symbol[int] => lldb.Symbol, lookup symbol by zero based index
      lldb.SBModule.symbol[str] => list() of lldb.Symbol objects that match "str"
      lldb.SBModule.symbol[re] => list() of lldb.Symbol objecxts that match the regex
      lldb.SBModule.symbols => list() of all symbols in a module
      
        
      SBAddress objects can now access the current load address with the "lldb.SBAddress.load_addr"
      property. The current "lldb.target" will be used to try and resolve the load address.
      
      Load addresses can also be set using this accessor:
      
      addr = lldb.SBAddress()
      addd.load_addr = 0x123023
      
      Then you can check the section and offset to see if the address got resolved.
      
      SBTarget now exposes:
      
      lldb.SBTarget.module[int] => lldb.SBModule from zero based module index
      lldb.SBTarget.module[str] => lldb.SBModule by basename or fullpath or uuid string
      lldb.SBTarget.module[uuid.UUID()] => lldb.SBModule whose UUID matches
      lldb.SBTarget.module[re] => list() of lldb.SBModule objects that match the regex
      lldb.SBTarget.modules => list() of all lldb.SBModule objects in the target
      
      SBSymbol now exposes:
      
      lldb.SBSymbol.name => python string for demangled symbol name
      lldb.SBSymbol.mangled => python string for mangled symbol name or None if there is none
      lldb.SBSymbol.type => lldb.eSymbolType enum value
      lldb.SBSymbol.addr => SBAddress object that represents the start address for this symbol (if there is one)
      lldb.SBSymbol.end_addr => SBAddress for the end address of the symbol  (if there is one)
      lldb.SBSymbol.prologue_size => pythin int containing The size of the prologue in bytes
      lldb.SBSymbol.instructions => SBInstructionList containing all instructions for this symbol
      
      SBFunction now also has these new properties in addition to what is already has:
      lldb.SBFunction.addr => SBAddress object that represents the start address for this function
      lldb.SBFunction.end_addr => SBAddress for the end address of the function
      lldb.SBFunction.instructions => SBInstructionList containing all instructions for this function
      
      SBFrame now exposes the SBAddress for the frame:
      lldb.SBFrame.addr => SBAddress which is the section offset address for the current frame PC
      
      These are all in addition to what was already added. Documentation and website
      updates coming soon.
      
      llvm-svn: 149489
      6b2bd939
    • Elena Demikhovsky's avatar
      Optimization for "truncate" operation on AVX. · 0e48c70b
      Elena Demikhovsky authored
      Truncating v4i64 -> v4i32 and v8i32 -> v8i16 may be done with set of shuffles.
      
      llvm-svn: 149485
      0e48c70b
    • Stepan Dyatkovskiy's avatar
      Compatability fix for SwitchInst refactoring. · 5fecf544
      Stepan Dyatkovskiy authored
      The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.
      
      What was done:
      
      1. Changed semantics of index inside the getCaseValue method:
      getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
      2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
      3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
      4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
      4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
      4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.
      
      Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.
      llvm-svn: 149482
      5fecf544
    • Stepan Dyatkovskiy's avatar
      SwitchInst refactoring. · 513aaa56
      Stepan Dyatkovskiy authored
      The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.
      
      What was done:
      
      1. Changed semantics of index inside the getCaseValue method:
      getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
      2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
      3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
      4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
      4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
      4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.
      
      Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.
      llvm-svn: 149481
      513aaa56
    • Andrew Trick's avatar
      Add pass printer passes in the right place. · cbc845f9
      Andrew Trick authored
      The pass pointer should never be referenced after sending it to
      schedulePass(), which may delete the pass. To fix this bug I had to
      clean up the design leading to more goodness.
      
      You may notice now that any non-analysis pass is printed. So things like loop-simplify and lcssa show up, while target lib, target data, alias analysis do not show up. Normally, analysis don't mutate the IR, but you can now check this by using both -print-after and -print-before. The effects of analysis will now show up in between the two.
      
      The llc path is still in bad shape. But I'll be improving it in my next checkin. Meanwhile, print-machineinstrs still works the same way. With print-before/after, many llc passes that were not printed before now are, some of these should be converted to analysis. A few very important passes, isel and scheduler, are not properly initialized, so not printed.
      
      llvm-svn: 149480
      cbc845f9
    • Andrew Trick's avatar
      whitespace · 96c21592
      Andrew Trick authored
      llvm-svn: 149479
      96c21592
    • Craig Topper's avatar
    • Argyrios Kyrtzidis's avatar
      Revert r149363 which was part a series of commits that were reverted in llvm · a11b35a9
      Argyrios Kyrtzidis authored
      commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c.
      
      Original log:
      
          ConstantArray::get() (for strings) is going away, use
          ConstantDataArray::getString instead.
      
          Many instances of ConstantArray::get() could be moved to
          use more efficient ConstantDataArray methods that avoid a ton
          of intermediate Constant*'s for each element (e.g.
          GetConstantArrayFromStringLiteral).  I don't plan on doing this
          in the short-term though.
      
      llvm-svn: 149477
      a11b35a9
    • Argyrios Kyrtzidis's avatar
    • NAKAMURA Takumi's avatar
    • Eric Christopher's avatar
      For pass-by-value record arguments to functions emit a forward decl · ee4ab939
      Eric Christopher authored
      instead of the entire class definition.
      
      llvm-svn: 149474
      ee4ab939
    • Richard Smith's avatar
      c8042323
    • Hal Finkel's avatar
      A few of the changes suggested in code review (by Nick Lewycky) · 8a3aebe5
      Hal Finkel authored
      llvm-svn: 149472
      8a3aebe5
    • Douglas Gregor's avatar
      When providing code completions for a switch over a scoped enumeration · d3cebdba
      Douglas Gregor authored
      type, be sure to add the qualifier for the enumeration type.
      
      llvm-svn: 149471
      d3cebdba
    • Argyrios Kyrtzidis's avatar
      Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail. · 17c981a4
      Argyrios Kyrtzidis authored
      These are:
      
      r149348
      r149351
      r149352
      r149354
      r149356
      r149357
      r149361
      r149362
      r149364
      r149365
      
      llvm-svn: 149470
      17c981a4
    • Richard Smith's avatar
      constexpr: Unlike other incomplete types, 'void' cannot possibly be completed as · 02879105
      Richard Smith authored
      a literal type. Disallow it as the return type of a constexpr function
      declaration.
      
      llvm-svn: 149469
      02879105
    • Hal Finkel's avatar
      Add a basic-block autovectorization pass. · c34e5113
      Hal Finkel authored
      This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure.
      Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser).
      
      llvm-svn: 149468
      c34e5113
    • Richard Smith's avatar
      47b34932
    • Greg Clayton's avatar
      Added a new convenience property on lldb.SBThread names "frames" which always... · 2415586f
      Greg Clayton authored
      Added a new convenience property on lldb.SBThread names "frames" which always returns a complete list of all lldb.SBFrame objects:
      
      (lldb) script
      >>> frames = lldb.thread.frames
      >>> for frame in frames:
      ...   print frame
      
      Also changed all of the "__repr__" methods to strip any trailing newline characters so we don't end up with entra newlines.
      
      llvm-svn: 149466
      2415586f
    • Johnny Chen's avatar
      lldb should warn when dSYM does not match the binary. · fdc80a5c
      Johnny Chen authored
      o Symbols.cpp:
      
        Emit a warning message when dSYM does not match the binary.
      
      o warnings/uuid:
      
        Added regression test case.
      
      o lldbtest.py:
      
        Modified to allow test case writer to demand that the build command does not begin
        with a clean first; required to make TestUUIDMismatchWanring.py work.
      
      rdar://problem/10515708
      
      llvm-svn: 149465
      fdc80a5c
    • Greg Clayton's avatar
      Added a new class to the lldb python module: · 05e8d194
      Greg Clayton authored
      lldb.value()
      
      It it designed to be given a lldb.SBValue object and it allows natural
      use of a variable value:
      
          pt = lldb.value(lldb.frame.FindVariable("pt"))
          print pt
          print pt.x
          print pt.y
      
          pt = lldb.frame.FindVariable("rectangle_array")
          print rectangle_array[12]
          print rectangle_array[5].origin.x
      
      Note that array access works just fine and works on arrays or pointers:
      
      pt = lldb.frame.FindVariable("point_ptr")
      print point_ptr[5].y
      
      Also note that pointer child accesses are done using a "." instead of "->":
      
      print point_ptr.x
      
      llvm-svn: 149464
      05e8d194
    • Richard Smith's avatar
      constexpr: add support for comparisons of pointer-to-members. · 7bb0067c
      Richard Smith authored
      llvm-svn: 149463
      7bb0067c
    • Douglas Gregor's avatar
      Improve checking of explicit captures in a C++11 lambda expression: · 53a9bdf1
      Douglas Gregor authored
        - Actually building the var -> capture mapping properly (there was an off-by-one error)
        - Keeping track of the source location of each capture
        - Minor QoI improvements, e.g, highlighing the prior capture if
        there are multiple captures, pointing at the variable declaration we
        found if we reject it.
      
      As part of this, add standard citations for the various semantic
      checks we perform, and note where we're not performing those checks as
      we should.
      
      llvm-svn: 149462
      53a9bdf1
    • Enrico Granata's avatar
      remove spurious leftover code from std::list testcase · 8680c713
      Enrico Granata authored
      llvm-svn: 149461
      8680c713
    • Nico Weber's avatar
      Fix crash on invalid in microsoft anonymous struct extension. · f8bb3de4
      Nico Weber authored
      Fixes PR11847. Patch from Jason Haslam!
      
      llvm-svn: 149460
      f8bb3de4
    • Howard Hinnant's avatar
      Here's a test for catching pointers. · 3b22c6c3
      Howard Hinnant authored
      llvm-svn: 149459
      3b22c6c3
    • Douglas Gregor's avatar
      0e8ff39d
    • Jim Grosbach's avatar
      Disable InstCombine unsafe folding bitcasts of calls w/ varargs. · 9fa04815
      Jim Grosbach authored
      Changing arguments from being passed as fixed to varargs is unsafe, as
      the ABI may require they be handled differently (stack vs. register, for
      example).
      
      Remove two tests which rely on the bitcast being folded into the direct
      call, which is exactly the transformation that's unsafe.
      
      llvm-svn: 149457
      9fa04815
    • Tobias Grosser's avatar
      www: More typos · ab1f7c4e
      Tobias Grosser authored
      Pointed out by Chad Rosier
      
      llvm-svn: 149456
      ab1f7c4e
    • Bob Wilson's avatar
      Use the new Triple::getMacOSXVersion function in another place. · 8e5acc5c
      Bob Wilson authored
      I removed support for "*-darwin*-iphoneos" triples, since we now have
      iOS listed as a separate OS in the triples.
      
      llvm-svn: 149455
      8e5acc5c
    • Bob Wilson's avatar
      Fix an assertion failure in isMacOSXVersionLT for IOS targets. · c3337493
      Bob Wilson authored
      Check if the triple OS is IOS instead of checking for arm/thumb architectures
      and check that before calling isMacOSXVersionLT.
      
      llvm-svn: 149454
      c3337493
Loading