[llvm] r208056 - [Build] Add rule to generate fully-expanded .td file

Adam Nemet anemet at apple.com
Mon May 5 20:49:45 PDT 2014

Author: anemet
Date: Mon May  5 22:49:45 2014
New Revision: 208056

URL: http://llvm.org/viewvc/llvm-project?rev=208056&view=rev
[Build] Add rule to generate fully-expanded .td file

I found it useful in the past and now again to have a version of the .td file
where all the records are expanded.  This adds a makefile rule to generate
this on demand.


Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=208056&r1=208055&r2=208056&view=diff
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Mon May  5 22:49:45 2014
@@ -1713,8 +1713,14 @@ $(ObjDir)/%GenDFAPacketizer.inc.tmp : %.
 	$(Echo) "Building $(<F) DFA packetizer tables with tblgen"
 	$(Verb) $(LLVMTableGen) -gen-dfa-packetizer -o $(call SYSPATH, $@) $<
+# Dump all the records to <target>.td.expanded.  This is useful for debugging.
+$(TARGET:%=%.td.expanded): \
+%.td.expanded : %.td $(LLVM_TBLGEN)
+	$(Echo) "Building a fully expanded version of $(<F)"
+	$(Verb) $(LLVMTableGen) -o $(call SYSPATH, $@) $<
-	-$(Verb) $(RM) -f $(INCFiles)
+	-$(Verb) $(RM) -f $(INCFiles) $(TARGET).td.expanded
 endif # TARGET

More information about the llvm-commits mailing list