[PATCH] WIP: DI: Fold constant arguments into a single MDString

Adrian Prantl aprantl at apple.com
Tue Sep 9 15:31:11 PDT 2014


> On Sep 9, 2014, at 3:04 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> 5. Do you have specific advice on automating the testcase update flow?
>    My next step is building tool support, so suggestions (and starter
>    scripts) are welcome.
> 
> <0001-DI-Fold-constant-arguments-into-a-single-MDString.patch>

Attached is the horrible, horrible Python script I used to perform the two-pass upgrade for http://reviews.llvm.org/D4919 / rdar://problem/17994491. Based from the experiences with that, using regexes to parse metadata actually works, but is not exactly recommended. Although all testcases were emitted by LLVM, they were emitted by different versions of it, so it is surprisingly hard to come up with generic enough regexes. If you wouldn’t have to also preserve all the comments in the testcases, you could alternatively hack the printInternal methods and AsmWriter to output the new format.
Also note that it is often impossible to auto-upgrade any CHECK:-lines because they will often contain incomplete or otherwise ambiguous syntax.

-- adrian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: upgrade-dbg-intrinsics.py
Type: text/x-python-script
Size: 5994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140909/d41989a0/attachment.bin>


More information about the llvm-commits mailing list