- Mar 25, 2012
-
-
Chandler Carruth authored
fire if anything ever invalidates the assumption of a terminator instruction being unchanged throughout the routine. I've convinced myself that the current definition of simplification precludes such a transformation, so I think getting some asserts coverage that we don't violate this agreement is sufficient to make this code safe for the foreseeable future. Comments to the contrary or other suggestions are of course welcome. =] The bots are now happy with this code though, so it appears the bug here has indeed been fixed. llvm-svn: 153401
-
Rafael Espindola authored
llvm-svn: 153400
-
Chandler Carruth authored
list. This is a bad idea. ;] I'm hopeful this is the bug that's showing up with the MSVC bots, but we'll see. It is definitely unnecessary. InstSimplify won't do anything to a terminator instruction, we don't need to even include it in the iteration range. We can also skip the now dead terminator check, although I've made it an assert to help document that this is an important invariant. I'm still a bit queasy about this because there is an implicit assumption that the terminator instruction cannot be RAUW'ed by the simplification code. While that appears to be true at the moment, I see no guarantee that would ensure it remains true in the future. I'm looking at the cleanest way to solve that... llvm-svn: 153399
-
- Mar 24, 2012
-
-
Rafael Espindola authored
llvm-svn: 153398
-
Chandler Carruth authored
spotted by inspection, and I've crafted no test case that triggers it on my machine, but some of the windows builders are hitting what looks like memory corruption, so *something* is amiss here. This patch takes a more generalized approach to eliminating double-visits. Imagine code such as: %x = ... %y = add %x, 1 %z = add %x, %y You can imagine that if we simplify %x, we would add %y and %z to the list. If the use-chain order happens to cause us to add them in reverse order, we could pull %y off first, and simplify it, adding %z to the list. We now have %z on the list twice, and will reference it after it is deleted. Currently, all my test cases happen to not trigger this, likely due to the use-chain ordering, but there seems no guarantee that such a situation could not occur, so we should handle it correctly. Again, if anyone knows how to craft a testcase that actually triggers this, please let me know. llvm-svn: 153397
-
Chandler Carruth authored
worklist. This can happen in theory when an instruction uses itself, such as a PHI node. This was spotted by inspection, and unfortunately I've not been able to come up with a test case that would trigger it. If anyone has ideas, let me know... llvm-svn: 153396
-
Jean-Daniel Dupas authored
llvm-svn: 153395
-
Chandler Carruth authored
regressed seriously here, we are no longer removing allocas during inline cleanup. This appears to be because of lifetime markers "using" them. =/ I'll look into this shortly. llvm-svn: 153394
-
Chandler Carruth authored
bit simpler by handling a common case explicitly. Also, refactor the implementation to use a worklist based walk of the recursive users, rather than trying to use value handles to detect and recover from RAUWs during the recursive descent. This fixes a very subtle bug in the previous implementation where degenerate control flow structures could cause mutually recursive instructions (PHI nodes) to collapse in just such a way that From became equal to To after some amount of recursion. At that point, we hit the inf-loop that the assert at the top attempted to guard against. This problem is defined away when not using value handles in this manner. There are lots of comments claiming that the WeakVH will protect against just this sort of error, but they're not accurate about the actual implementation of WeakVHs, which do still track RAUWs. I don't have any test case for the bug this fixes because it requires running the recursive simplification on unreachable phi nodes. I've no way to either run this or easily write an input that triggers it. It was found when using instruction simplification inside the inliner when running over the nightly test-suite. llvm-svn: 153393
-
Rafael Espindola authored
llvm-svn: 153392
-
Rafael Espindola authored
llvm-svn: 153391
-
Benjamin Kramer authored
llvm-svn: 153389
-
Fariborz Jahanian authored
used in modern objc translator. // rdar://11105680 llvm-svn: 153386
-
Rafael Espindola authored
llvm-svn: 153385
-
Fariborz Jahanian authored
fields in _class_ro_t metadata. // rdar://11079898 llvm-svn: 153384
-
Rafael Espindola authored
Thanks to NAKAMURA Takumi for finding it! llvm-svn: 153383
-
NAKAMURA Takumi authored
Revert r153360 (and r153380), "Second part of PR12251. Produce the range metadata in clang for booleans and". For i686 targets (eg. cygwin), I saw "Range must not be empty!" in verifier. It produces (i32)[0x80000000:0x80000000) from (uint64_t)[0xFFFFFFFF80000000ULL:0x0000000080000000ULL), for signed i32 on MDNode::Range. llvm-svn: 153382
-
Benjamin Kramer authored
llvm-svn: 153381
-
Benjamin Kramer authored
llvm-svn: 153380
-
Alexey Samsonov authored
llvm-svn: 153379
-
Alexey Samsonov authored
llvm-svn: 153378
-
Alexey Samsonov authored
llvm-svn: 153377
-
Alexey Samsonov authored
llvm-svn: 153376
-
Jason Molenda authored
llvm-svn: 153374
-
Hal Finkel authored
The PPC64 SVR4 ABI requires integer stack arguments, and thus the var. args., that are smaller than 64 bits be zero extended to 64 bits. llvm-svn: 153373
-
Hal Finkel authored
llvm-svn: 153372
-
Jason Molenda authored
llvm-svn: 153371
-
Jordy Rose authored
[analyzer] Tighten up the realloc() failure path note generation...make sure we get the right realloc()! llvm-svn: 153370
-
Jordy Rose authored
[analyzer] Restart path diagnostic generation if any of the visitors change the report configuration while walking the path. This required adding a change count token to BugReport, but also allowed us to ditch ImmutableList as the BugReporterVisitor data type. Also, remove the hack from MallocChecker, now that visitors appear in the opposite order. This is not exactly a fix, but the common case -- custom diagnostics after generic ones -- is now the default behavior. llvm-svn: 153369
-
Jordy Rose authored
[analyzer] Add a clone() method to BugReporterVisitor, so that we'll be able to reset diagnostic generation. llvm-svn: 153368
-
Argyrios Kyrtzidis authored
recover by returning the statements that we parsed so far, instead of dropping the whole function body. rdar://10967343 llvm-svn: 153367
-
Francois Pichet authored
llvm-svn: 153366
-
Johnny Chen authored
llvm-svn: 153365
-
Justin Holewinski authored
Code such as: %vreg100 = setcc %vreg10, -1, SETNE brcond %vreg10, %tgt was being incorrectly morphed into %vreg100 = and %vreg10, 1 brcond %vreg10, %tgt where the 'and' instruction could be eliminated since such logic is on 1-bit types in the PTX back-end, leaving us with just: brcond %vreg10, %tgt which essentially gives us inverted branch conditions. llvm-svn: 153364
-
Enrico Granata authored
Adding a new API call IsTypeComplete() to SBType. This call is meant to check if the type has been previously completed or not (which is mostly interesting from a performance point of view) Adding a test case that checks that we do not complete types before due time. This should help us track cases similar to the cascading data formatters. llvm-svn: 153363
-
Andrew Trick authored
llvm-svn: 153362
-
rdar://problem/11101372Sean Callanan authored
We now reject binaries built with LTO and print an error, rather than crashing later while trying to parse them. llvm-svn: 153361
-
Rafael Espindola authored
c++ enums. llvm-svn: 153360
-
Rafael Espindola authored
metadata. llvm-svn: 153359
-
Richard Smith authored
some calling code to actually pass in a non-null type, to avoid a crash. llvm-svn: 153358
-