How to Make It
Heat a grill to medium-high (400° to 500°). Mix ancho chile powder, brown sugar, and salt together. Rub pork tenderloin and corn with oil, then sprinkle with ancho mixture. (If you do this the night before, you'll be that much ahead--and the flavor will be deeper.)
Oil grill with a wad of oiled paper towels. Grill tenderloin, corn, and onion slices, turning occasionally, until corn is blackened in spots and onion is softened, about 8 minutes. Transfer corn and onion to a cutting board and let cool briefly.
Move pork to a cooler spot if on a charcoal grill, or lower heat to medium-low on a gas grill. Cover grill and cook until done the way you like it, about 8 minutes for medium (about 155° on an instant-read thermometer). Transfer tenderloin to a cutting board and let rest briefly.
Meanwhile, cut corn kernels from cob into a bowl. Roughly chop onion and add with tomatoes to corn. Stir in lime juice, parsley, oregano, and salt and pepper to taste.
Slice tenderloin, divide among 4 plates, and drizzle with any juices. Top with corn relish.